import java.util.; import java.io.; public class Main{ public static void main(String[] args)throws IOException{ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); int num = Integer.parseInt(in.readLine()); String result =""; for(int i = 2;i <= Math.sqrt(num);i++){ while(num % i == 0){ result += i + " "; num /= i; } } if(num != 1) result += num + " "; System.out.println(result); } }