import math d = 13979 for o in range(1, d): n = math.sqrt(d*d-o*o) if n%1 == 0: print (o, int(n)) break