class Test4 {
public static void main(String[] args) {
int temp = 0;
for (int i=1;i<=100;i++){
int sum = 0;
for (int j=1;j<=i;j++){
if (i%j ==0){
sum ++;
}
}
if (sum < 3){
temp ++;
System.out.print(i+" ");
}
if (temp % 5 == 0){
System.out.println();
}
}
System.out.println("素数有"+ temp + "个" );
}
}