import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int select = sc.nextInt(); while (select!=1){ for (int i=2;i<=select;i++){ if (select%i==0){ System.out.print(i+" "); select=select/i; i--; } } } } }