function main(input) {
    const args = input.split(' ');
    const age = parseInt(args[0], 10);
    
    if(age === 7 || age == 5 || age == 3 ) {
        console.log("YES");
    }
    else {
        console.log("NO");
    }
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));