function main(input) {
    const age = input

    if( age == 3 || age == 5 || age == 7 ){
        Console.log("YES");
    }
    else{
        Console.log("NO");
    }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));