"use strict";
function main(input) {
  const inputs = input.split("\n").filter(x => x !== "");

  let X = inputs[0];
  switch (X) {
    case "3":
    case "5":
    case "7":
      console.log("YES");
      break;
    default:
      console.log("NO");
  }
}

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