function Main(input) {
    var D = input.split("\n")[0] - 0;
    var str;
    switch (D) {
    case 7: 
    case 5:
    case 3:
        str = 'YES';
        break;
    default:
        str = 'NO';
    }

    console.log(str);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
