output_description: If N_1, N_2, N_3 and N_4 can be arranged into the sequence of digits "1974",
  print `YES`; if they cannot, print `NO`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N_1 N_2 N_3 N_4
attempt: import sys
  
  """テンプレ"""
  
  # 高速
  input = sys.stdin.readline
  
  # 1行を空白でリストにする(int)
  def intline():
      return list(map(int, input().split()))
  
  
  # 上のstrヴァージョン
  def strline():
      return list(map(str, input().split()))
  
  
  # 1列に並んだ数
  def intlines(n):
      return [int(input() for _ in range(n))]
  
  
  # 上の文字列ヴァージョン
  def lines(n):
      return [input() for _ in range(n)]
      
  
  """ここからメインコード"""
  
  k = intline().sort()
  if k = [1, 4, 7, 9]:print("YES")
  else:print("NO")
problem_description: Statement
  
  You are given four digits N_1, N_2, N_3 and N_4. Determine if these can be
  arranged into the sequence of digits "1974".
samples: [{"input": "1 7 9 4", "output": "YES\n    \n\nWe can get 1974 by swapping N_2 and N_3.\n\n* * *"}, {"input": "1 9 7 4", "output": "YES\n    \n\nWe already have 1974 before doing anything.\n\n* * *"}, {"input": "1 2 9 1", "output": "NO\n    \n\n* * *"}, {"input": "4 9 0 8", "output": "NO"}]