function Main(input){
    var X = parseInt(input,10);

    if(X===7||X===5||X===3){
        console.log("YES");
    }else{
        console.log("NO");
    }
}
Main(require('fs').readFileSync('/dev/stdin','utf8'));