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