1import java.util.Scanner;
2
3public class PrimeFactors {
4 public static void main(String args[]){
5 int number;
6 Scanner sc = new Scanner(System.in);
7 System.out.println("Enter a number ::");
8 number = sc.nextInt();
9
10 for(int i = 2; i< number; i++) {
11 while(number%i == 0) {
12 System.out.println(i+" ");
13 number = number/i;
14 }
15 }
16 if(number >2) {
17 System.out.println(number);
18 }
19 }
20}