import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;


public class Prime{

    private static List<Integer> primes = new ArrayList();


    private static void sieve( int n ) {
        BitSet isPrime = new BitSet();
        isPrime.set( 0, false);
        isPrime.set( 1, false );

        isPrime.set( 2, n, true );


        for( int i=2; i*i<n; i++ )
        {
            if( isPrime.get( i ))
            {
                for( int j=i*i; j<n; j+=i )
                {
                    isPrime.clear( j );
                }
            }
        }
        int count = 0;
        for (int i=0; i<n; i++) {
            if (isPrime.get(i)) {
//                System.out.println(i);
                primes.add(i);
                count++;
            }
        }
//        System.out.println(count);

    }
    public static List<Long> primeFactors( long n )
    {
        List<Long> factors = new ArrayList<>();
        Map<Long,Integer> counts = new HashMap<>();

        if( n==0 )
        {
            factors.add( 0l );
            return factors;
        }

        if( n==1 )
        {
            factors.add( 1l);
            return factors;
        }



        for(int prime : primes)
        {
            while( n%prime == 0 )
            {
                factors.add((long) prime);
                n = n/prime;
            }

            if ( n<=prime && n!=1 ) {
                factors.add(n);
            }

        }
//        for (long x : factors) {
//            System.out.print(x + " ");
//        }
//        System.out.println();
        return factors;
    }


    public static void main( String[] args ) throws Exception {
        int MAX = 1000000 + 1;
        sieve(MAX);
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        long X = Long.parseLong(br.readLine());
        List<Long> factors = primeFactors(X);
        List<Long> unique = new ArrayList<>();
        if (factors.isEmpty()) {
            System.out.println("1 " + X);
        } else {
            Map<Long, Integer> counts = new HashMap<>();
            for (long f : factors) {
                if (counts.containsKey(f)) {
                    int c = counts.get(f);
                    counts.put(f, c+1);
                } else {
                    unique.add(f);
                    counts.put(f, 1);
                }
            }
           // Try all possibilities with left.
            int remaining = counts.size();
            long MIN_NUMBER = Long.MAX_VALUE;
            long x = 1;
            long y = 1;

            for (int i = 0; i < (1<<remaining); i++)
            {
                long product1 = 1;
                long product2 = 1;
                for (int j = 0; j < remaining; j++) {
                    if ((i & (1 << j)) > 0) {
                        long val = unique.get(j);
                        int cnt = counts.get(val);
                        for (int w=0; w<cnt; w++) {
                            product1 = product1 * val;
                        }
                    } else {
                        long val = unique.get(j);
                        int cnt = counts.get(val);
                        for (int w=0; w<cnt; w++) {
                            product2 = product2 * val;
                        }
                    }
                }
                long MAX_PAIR = Math.max(product1, product2);
                if (MAX_PAIR < MIN_NUMBER) {
                    MIN_NUMBER = MAX_PAIR;
                    x = product1;
                    y = product2;
                }
            }
            System.out.println(x + " " + y);
        }
    }







}