function Main(input) {
	input = parseInt(input.trim());
	if(input == 3 || input == 5 || input == 7){
       console.log("YES");
       }else{
        console.log("NO"); 
       }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
