Your approach is flawed because 1 is in the range of the function eg. m = 1/12 and n = 0. Your approach does not take into account the simple fact that the 'domain' is required to be the integers not real numbers.

(This is one reason why I have moved your question to number theory).

The required proof probably expects you to note that the gcd of 12 and 15 is not 1.