import sympy a = str(sympy.sqrt(int(input()))).split('*') if 'sqrt' in a[0]: print(1,a[0][5:-1]) elif 'sqrt' in a[-1]: print(a[0],a[-1][5:-1]) else: print(a[0],1)