function main(input) {
  var x = input[0]-0;
  var ans = "NO";
  switch(x){
    case 7:
    case 5:
    case 3:
      ans = "YES";
  }
  console.log(ans);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"))
