import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long M = sc.nextLong(); long ans = 1; for(long i = 2; i*i <= M; i++) { if(M % i == 0) { ans = i; M /= i; break; } } System.out.println(ans + " " + M); } }