const main = input => {
  const X = input.trim()
  if (X === '7' || X === '5' || X === '3') {
    console.log('YES')
  } else {
    console.log('NO')
  }
}
// 標準入力
main(require("fs").readFileSync("/dev/stdin", "utf8"));
