function main(input) {
  var args = input;
  var x = parseInt(args, 10);

  if (x === 7 || x === 5 || x === 3) {
    console.log('YES');
  } else {
    console.log('NO');
  }
}

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