public boolean isPrime(int x){
if(x % 2 == 0 && x > 2)
return false;
if(x <= 1){
return false;
}
if(x == 2){
return true;
}