function Main(input) {
	input = input.split("\n");
	tmp = input[0].split(" ");
	var age = parseInt(input[0], 10);
    if (age === 7 || age === 5 || age === 3) {
      console.log('YES');
    } else {
      console.log('NO');
    }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));