int gcd(int m, int r);