public static int commonDivisor(int n,int m){while(n % m != 0){int temp = n % m;n = m;m = temp;}return m;}