"use strict";
function Main (input) {
const age = parseInt(input);
const yes = age === 3 || age === 5 || age === 7;
console.log(yes ? "YES" : "NO");
}

//標準入力から文字列を受け取ってMain関数を実行
Main(require("fs").readFileSync("/dev/stdin", "utf8"));