'use strict'

function Main(input) {
    const age = parseInt(input)
    const output = ['YES', 'NO'][isValid(age) ? 0 : 1]
    console.log(output)
}

function isValid(age) {
    return [3, 5, 7].indexOf(age) !== -1
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));