#include <stdio.h>
int num[10000001];
int main() {
int n;
int cnt=0;
scanf("%d",&n);
while(n>1) {
for(int i=2; i<=n; i++) {
if(n%i==0) {
num[cnt++]=i;
n=n/i;
break;
}
}
}
for(int i=0; i<cnt; i++) {
printf("%d\n",num[i]);
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: