import java.util.HashMap; import java.util.Map; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); sc.close(); Map map = bunkai(n); int a = 1; int b = 1; for (int k : map.keySet()) { a *= (int) Math.pow(k, map.get(k) / 2); b *= (int) Math.pow(k, map.get(k) % 2); } System.out.println(a + " " + b); } static Map bunkai(int n) { Map soinsu = new HashMap<>(); int end = (int) Math.sqrt(n); int d = 2; while (n > 1) { if (n % d == 0) { n /= d; if (soinsu.containsKey(d)) { soinsu.put(d, soinsu.get(d) + 1); } else { soinsu.put(d, 1); } end = (int) Math.sqrt(n); } else { if (d > end) { d = n - 1; } d++; } } return soinsu; } }