/*
If you want to aim high, aim high
Don't let that studying and grades consume you
Just live life young
******************************
If I'm the sun, you're the moon
Because when I go up, you go down
*******************************
*/
import java.util.*;
import java.io.*;

   public class x1285C
   {
      public static void main(String args[]) throws Exception
      {
         //BufferedReader infile = new BufferedReader(new FileReader("cowdate.in"));
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         long X = Long.parseLong(st.nextToken());
         String res = 1+" "+X;
         long max = X;
         ArrayList<Long> ls = findDiv(X);
         for(long f: ls)
         {
            long g = X/f;
            if(Math.max(f,g) < max && gcd(f,g) == 1)
            {
               res = f+" "+g;
               max = Math.max(f,g);
            }
         }
         System.out.println(res);
      }
      public static long gcd(long a, long b)
      {
         if(a > b)
         {
            long t = a;
            a = b;
            b = t;
         }
         if(a == 0L)
            return b;
         return gcd(b%a, a);
      }
      public static ArrayList<Long> findDiv(long N)
      {
         //gens all divisors of N
         ArrayList<Long> ls1 = new ArrayList<Long>();
         ArrayList<Long> ls2 = new ArrayList<Long>();
         for(int i=1; i <= (int)(Math.sqrt(N)+0.00000001); i++)
            if(N%i == 0)
            {
               ls1.add((long)i);
               ls2.add(N/i);
            }
         Collections.reverse(ls2);
         for(long b: ls2)
            if(b != ls1.get(ls1.size()-1))
               ls1.add(b);
         return ls1;
      }
   }