process.stdin.resume();
process.stdin.setEncoding('utf8');
var lines = [];
var reader = require('readline').createInterface({
    input: process.stdin,
    output: process.stdout
});
reader.on('line', (line) => {
    lines.push(line);
});
reader.on('close', () => {
    solve(lines[0]);
});

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