function main(input){
  var line = input[0].split(' ').sort();
  console.log(line.join('') ==='1479' ? 'YES' : 'NO' );
}


var input = '';

process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function(chunk) {
  input += chunk;
});
process.stdin.on('end', function() {
  input = input.split('\n');
  main(input);
});
