A four-digit integer m and the four-digit integer obtained by reversing the order of the digits of m are both divisible by 45. If m is divisible by 7, what is the greatest possible value of m?
The greatest value of m=5,985, because:
5,985 mod 45 == 0 and
5,985 mod 7 == 0 and
5,895 mod 45 == 0