import java.util.*;
import java.io.*;

public class Solution
{
    static class Reader {
		BufferedReader br;
		StringTokenizer st;
 
		public Reader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
 
		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}
 
		int nextInt() {
			return Integer.parseInt(next());
		}
 
		long nextLong() {
			return Long.parseLong(next());
		}
 
		double nextDouble() {
			return Double.parseDouble(next());
		}
 
		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
 
	}
    static class Ele implements Comparable<Ele> 
    {  
        public int x,y;  
        Ele(int x,int y) 
        {  
            this.x=x;this.y=y; 
        }  
        public int compareTo(Ele ob) {  
        if(ob.x!=x)return x-ob.x;
        return this.y-ob.y;  
        }   
    }
    int a[][];int b[][];
    int solve(int i,int j)// 0-none, 1-true,2-false
    {
        //System.out.println(i+" "+j);
        if (i==a.length-1 || j==a.length-1) return 1;
        else {
            if (b[i][j]!=0) return b[i][j];
            b[i][j]=2;
            if (a[i+1][j]==1) 
            b[i][j]=solve(i+1,j);
            if (a[i][j+1]==1) 
            b[i][j]=Math.min(b[i][j],solve(i,j+1));
            return b[i][j];
        }
    }
    long gcd(long a,long b)
    {
        long min=Math.min(a,b);
        long max=Math.max(a,b);
        while (max%min!=0)
        {
            a=max%min;
            max=min;min=a;
        }
        return min;
    }
	public static void main(String[] args) throws IOException 
	{
		Reader sc=new Reader();Solution G=new Solution();
		PrintWriter o = new PrintWriter(System.out);
		//int t=sc.nextInt();
		int t=1;
		long n;
		//HashSet<Integer> ob1=new HashSet<>();
		while (t-->0)
		{
		    n=sc.nextLong();long k=1;
		    for (long i=1;i*i<=n;i++)
		    {
		        if (n%i==0 && G.gcd(i,n/i)==1)
		        k=i;
		    }
		    o.println(k+" "+(n/k));
		}
		
		//o.println(l);
		
        o.flush();
        o.close();
	}
} 