import java.util.Scanner; import java.util.ArrayList; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); long X = sc.nextLong(); ArrayList list = div(X); long sum = 0; for(long num:list) sum += num; if(sum+list.size()>200_000){ System.out.println(-1); return; } int[][] path = makePath(list); System.out.println(sum+list.size()); for(int[] p:path) System.out.println(p[0]+" "+p[1]); for(int i=0;i div(long X){ ArrayList ans = new ArrayList<>(); for(long i=3;i<=200_000;i++){ while(X%i==0){ ans.add(i); X /= i; } } if(X>1||ans.size()==0) ans.add(X); return ans; } public static int[][] makePath(ArrayList list){ ArrayList ans = new ArrayList<>(); int index = list.size(); for(int i=0;i