Characterization of the equality of Cauchy means to quasiarithmetic means