Main.java:9: error: incompatible types: String cannot be converted to int
valor = entrada.next();
^
Main.java:10: error: bad operand types for binary operator '&'
System.out.println( (valor&1==1 || valor<=2) ? "NO" : "YES");
^
first type: int
second type: boolean
2 errors