private static int GreatestCommonDivisor(int a, int b) { if (b == 0) return a; return GreatestCommonDivisor(b, a % b); } }