def lcm(p,q):
    min = 1
    max = 1
    if(p<q):
        min=p
        max = q
    else:
        min = q
        max = p
    LCM = max;
    for i in range(1,min+1):
        if( (max*i)%min == 0 ):
            LCM = max*i
            break
    return LCM


x = int(input())

a = 1

for i in range(1,x):
    if(i*i<x):
        a = i
    else:
        break

b = 1
while (a>=1) :
    if(x%a)==0:
        b=int(x/a)
        if(lcm(a,b)==x):
            break
    a = a-1


print(a," ",b)

