public class data {
public void main(String[] args) {
int n, i;
boolean prime = true;
for (i = 501; i < 1000; i++) {
for (n = 2; n < i; n++) {
if (i % n == 0) {
prime = false;
break;
} else {
prime = true;
}
}
if (prime) {
System.out.print(i + "\t");
}
}
}
}