c = raw_input() tmp = int(c**0.5) while True: tmp += 1 tmp2 = c - tmp**2 if int(tmp**0.5) == tmp**0.5: break tmp += 1 b = int(tmp**0.5) a = int((c - b**2)**0.5) print str(a) + ' ' + str(b)