using System;
public class Program
{
public static void Main()
Decimal a = 655443318; // CHANGE THIS TO TEST
if (IsOdd(a))
Decimal k = (a * a) / 2;
Console.WriteLine("a={0} b={1} c={2}", a, k, k + 1);
}
else
Decimal m = a / 2;
Decimal n = 1; // We can choose other factors of a / 2 so that a / 2 = m * n (if they exists of course)
Console.WriteLine("a={0} b={1} c={2}", a, (m * m - n * n), (m * m + n * n));
private static bool IsOdd(Decimal n)
return n % 2 != 0;