private static int rem(int a, int b) { return a%b; }