You are on page 1of 1

import java.util.

Scanner;

public class b6{

public static void main(String[] args){

Scanner sc = new Scanner(System.in);


int n= sc.nextInt();
int a[] = new int[100];
for(int i= 0; i <n; i++){
a[i] = sc.nextInt();
}
for (int i = 0; i < n; i++){
for( int j = 2;j < a[i];j++){
if(a[i]%j==0){
}else
{
System.out.print(a[i]+" ");
}
}
}
}
}

You might also like