input = gets.to_s
arrayOfInput = []
arrayOfInput << input.split(" ")[0].to_i
arrayOfInput << input.split(" ")[1].to_i
arrayOfInput << input.split(" ")[2].to_i
arrayOfInput << input.split(" ")[3].to_i

if arrayOfInput.include?(1) && arrayOfInput.include?(7) && arrayOfInput.include?(9) && arrayOfInput.include?(4) then
    puts "YES"
else
    puts "NO"
end