import java.util.Scanner; class sumfactors { public static void factors(int n ,int i) { if(i<=n) { if(n%i==0) { System.out.println(i + " "); } factors(n,i+1); } } public static void main(String args[]) { Scanner sc = new Scanner(System.in); int n =sc.nextInt(); factors(n,1); } }