function main(input) {
   input = input.trim();
  const a = input.split(" ").map(Number);
	console.log(a[0]==3||a[0]==5||a[0]==7?"YES":"NO");
  
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));