
def lcm(x, y):

   if x > y:
       greater = x
   else:
       greater = y

   while(True):
       if((greater % x == 0) and (greater % y == 0)):
           lcm = greater
           break
       greater += 1

   return lcm
   
def findab(x):
    if x==1:
      return 1,1
    else:
      for i in range (1,(int(x**0.5))+1):
        if ((x % i==0 )and (lcm(x/i,i)==x)):
            a=x//i
            b=i
        i=i+1
    return a,b