M = int(input()) x = 2 while M%x != 0 and M != x: x += 1 print(x,int(M/x))