import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int x = n; HashMap map = new HashMap<>(); for (int i = 2; i <= Math.sqrt(x); i++) { while (x % i == 0) { if (map.containsKey(i)) { map.put(i, map.get(i) + 1); } else { map.put(i, 1); } x /= i; } } if (x > 1) { if (map.containsKey(x)) { map.put(x, map.get(x) + 1); } else { map.put(x, 1); } } int ans = 1; for (Map.Entry entry : map.entrySet()) { for (int i = 2; i <= entry.getValue(); i += 2) { ans *= entry.getKey(); } } System.out.println(ans + " " + n / ans / ans); } }