// Java program For handling Input/Output 
import java.io.*; 
import java.util.*;
import java.math.*;
//import java.awt.*;

public class Main 
{ 
    FastReader sc;
    //actual logic
    void solve(){
        long x = sc.nl();
        int a = 0, b = 0;
        int min = Integer.MAX_VALUE;
        int i = (int)Math.sqrt(x);
        for(;i >= 1;i--)
        {
            if(x % i == 0 && gcd(i, (int)x/i) == 1)
            {
                System.out.println(i + " " + x/i);
                return;
            }
        }
    }

    int gcd(int a, int b){
        if(b == 0)
            return a;
        else
            return gcd(b, a%b);
    }
    
    //constructor
    Main()
    {
        try{  
            sc = new FastReader();
        }catch(Exception e){
            System.out.println(e);
        }
    }


    //main metohd
    public static void main(String[] args)
    { 
     new Main().solve();
    }
    //Utility methods

    static class FastReader{
        BufferedReader br;
        StringTokenizer st;
        FastReader(){
            br = new BufferedReader(new InputStreamReader(System.in));
            try{
                st = new StringTokenizer(br.readLine());
            }catch(Exception e){
                System.out.println(e);
            }
        }

        FastReader(String s){
            try{
                br = new BufferedReader(new FileReader(s));
                st = new StringTokenizer(br.readLine());
            }catch(Exception e){
                System.out.println(e);
            }
        }

        String ns(){
            if(!st.hasMoreTokens())
            {
                try{
                    st = new StringTokenizer(br.readLine());
                }catch(Exception e){
                    System.out.println(e);
                }    
            }
            return st.nextToken();

        }

        int ni(){
            return Integer.parseInt(ns());
        }

        long nl(){
            return Long.parseLong(ns());
        }

        double nd(){
            return Double.parseDouble(ns());
        }
    }
}
