'use strict'

function main(input) {
  input = ~~input

  const ans = input == 7 || input == 5 || input == 3 ? 'YES' : 'NO'

  console.log(ans)
}

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