import java.util.Map; import java.util.Scanner; import java.util.TreeMap; public class Main { @SuppressWarnings("resource") public static void main(String args[]) { Scanner scanner = new Scanner(System.in); long m=scanner.nextLong(); Mapmap=prime_fact(m); int i=0; long a=1; long b=1; for(long l:map.keySet()) { a=l; break; } for(long l:map.keySet()) { if(i==0) { b*=Math.pow(l, map.get(l)-1); i++; continue; } b*=Math.pow(l, map.get(l)); } System.out.println(a+" "+b); } private static Map prime_fact(long n) { Map map = new TreeMap<>(); double d = Math.sqrt(n); for (int i = 2; i <= d; i++) { int cnt = 0; while (n % i == 0) { n /= i; cnt++; } if (cnt != 0) { map.put((long) i, cnt); } } if (n != 1) { map.put(n, 1); } return map; } }