Problem:
 Score : 100 points    Problem 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 ".      Constraints  0 \leq N_1, N_2, N_3, N_4 \leq 9  N_1, N_2, N_3 and N_4 are integers.         Input Input is given from Standard Input in the following format:  N_1  N_2  N_3  N_4       Output 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 .        Sample Input 1 1 7 9 4      Sample Output 1 YES  We can get 1974 by swapping N_2 and N_3 .       Sample Input 2 1 9 7 4      Sample Output 2 YES  We already have 1974 before doing anything.       Sample Input 3 1 2 9 1      Sample Output 3 NO       Sample Input 4 4 9 0 8      Sample Output 4 NO

Solution (Python):

import sys

import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *



n = list(map(int, input().split()))

d = defaultdict(int)
for i in n:
    d[i] = 1

if (d[1] == 1 and d[9] == 1 and d[7] == 1 and d[4] == 1):
    print("YES")
else:
    print("NO")

Solution (Python):
ns = input().split(" ")
if ("1" in ns) and ("9" in ns) and ("7" in ns) and ("4" in ns):
    print("YES")
else:
    print("NO")

Solution (Python):
N=list(map(int,input().split()))

one=0
four=0
nine=0
seven=0

for i in range(4):
  if N[i]==1:
    one=1
  if N[i]==4:
    four=1
  if N[i]==9:
    nine=1
  if N[i]==7:
    seven=1

if one+four+nine+seven==4:
  print('YES')
else:
  print('NO')

Solution (Python):
nums = (list)(map(int, input().split()))

nums = sorted(nums)

if nums[0] == 1 and nums[1] == 4 and nums[2] == 7 and nums[3] == 9:
    print("YES")
else:
    print("NO")

Solution (Python):
N = list(map(int, input().split()))

if 1 in N:
    if 9 in N:
        if 7 in N:
            if 4 in N:
                print("YES")
                quit()
print("NO")

Solution (Python):
a = [int(i) for i in input().split()] 

if (1 in a) and 9 in a and 7 in a and 4 in a :
    print("YES")
else:
    print("NO")

Solution (Python):
N = list(map(int, input().split()))
if 1 in N and 7 in N and 9 in N and 4 in N:
    print('YES')
else:
    print('NO')

Solution (Python):
a = list(int(i) for i in input().split())  

if set(a) == {1,9,7,4}:
    print("YES")
else:
    print("NO")

Solution (Python):
N = list(map(int, input().split()))

if \
N.count(1) == 1 \
and N.count(9) == 1 \
and N.count(7) == 1 \
and N.count(4) == 1:
    print("YES")
else:
    print("NO")

Solution (Python):
s = input()
if '1' in s and '9' in s and '7' in s and '4' in s:
    print('YES')
else:
    print('NO')

Solution (Python):
num = list(map(int,input().split()))
if 1 in num and 4 in num and 7 in num and 9 in num:
  print('YES')
else:
  print('NO')

Solution (Python):
n = list(map(int, input().split()))
if 1 in n and 9 in n and 7 in n and 4 in n:
    print('YES')
else:
    print('NO')

Solution (Python):
while(True):
    try:
        n = input().split()
        print("YES" if '1' in n and '9' in n and '7' in n and '4' in n else "NO")
    except EOFError:
        exit()

Solution (Python):
n = input().split()
n.sort()
if n[0] + n[1] + n[2] + n[3] == '1479':
    print('YES')
else:print('NO')

Solution (Python):



def solve():
    N = list(map(int, input().split()))
    if 1 in N and 9 in N and 7 in N and 4 in N:
        print('YES')
    else:
        print('NO')


if __name__ == "__main__":
    solve()

Solution (Python):
N= list(map(int, input().split()))

if set(N)==set([1,9,7,4]):
    print('YES')
else:
    print('NO')

Solution (Python):
a = sorted(list(int(i) for i in input().split()) )
b = [1,4,7,9]
if a == b:
 ans ='YES'
else:
 ans ='NO'
print(ans)

Solution (Python):

N = list(map(int, input().split()))
N.sort()
print(['NO','YES'][''.join(map(str, N)) == '1479'])

Solution (Python):
n = input()
print('YES' if n.count('1') == n.count('9') == n.count('7') == n.count('4') else 'NO')

Solution (Python):
a = ''.join(sorted(''.join(list(input().split()))))

print('YES' if a == '1479' else 'NO')

Solution (Python):
N = [i for i in input().split()]

if '1' in N and '9' in N and '7' in N and '4' in N:
    print('YES')
else:
    print('NO')

Solution (Python):
from sys import stdin

def main():
    N = list(map(int, input().split()))

    N = tuple(sorted(N))
    if N == (1, 4, 7, 9):
        print('YES')
    else:
        print('NO')

input = lambda: stdin.readline()
main()

Solution (Python):
n = list(map(int, input().split()))

n = sorted(n)
if n == [1, 4, 7, 9]:
    print('YES')
else:
    print('NO')

Solution (Python):
inputs = input().split()
print('YES' if '1' in inputs and '9' in inputs and '7' in inputs and '4' in inputs else 'NO')

Solution (Python):
n1, n2, n3, n4 = map(int, input().split())

n = [n1, n2, n3, n4]
n.sort()

if n == [1, 4, 7, 9]:
    print('YES')
else:
    print('NO')

Solution (Python):
maps = list(map(int, input().split()))
if(all([maps.count(x) == 1 for x in [1, 7, 4, 9]])): print("YES")
else: print("NO")

Solution (Python):
N = list( input().split())
ans = "YES"
if not "1" in N:
    ans = "NO"
if not "9" in N:
    ans = "NO"
if not "7" in N:
    ans = "NO"
if not "4" in N:
    ans = "NO"
print(ans)

Solution (Python):
l = input().split()
for i in range(4):
    l[i]=int(l[i])
if 1 in l and  4 in l and  7 in l and  9 in l :
    print("YES")
else:
    print("NO")

Solution (Python):


N = list(map(int, input().split()))

N = sorted(N)

if N == [1, 4, 7, 9]:
    print("YES")
else:
    print("NO")

Solution (Python):
a = [False for i in range(4)]
N = map(int, input().split())
for n in N:
    if n == 1:
        a[0] = True
    elif n == 9:
        a[1] = True
    elif n == 7:
        a[2] = True
    elif n == 4:
        a[3] = True

for i in range(4):
    if a[i] == False:
        print('NO')
        exit()
print('YES')
exit()

Solution (Python):
N = list(map(int, input().split()))
count = [0, 0, 0, 0]
for i in range(4):
    if N[i] == 1:
        count[0] += 1
    elif N[i] == 9:
        count[1] += 1
    elif N[i] == 7:
        count[2] += 1
    elif N[i] == 4:
        count[3] += 1
if count[0] == count[1] and count[1] == count[2] and count[2] == count[3] and count[0] == 1:
    print("YES")
else:
    print("NO")

Solution (Python):
n = list(map(int, input().split()))

if 1 in n and 9 in n and 7 in n and 4 in n:
  print("YES")
else:
  print("NO")

Solution (Python):
n = list(map(int, input().split()))
if 1 in n and 9 in n and 7 in n and 4 in n: print('YES')
else: print('NO')

Solution (Python):
def main():
    *N, = map(int, input().split())

    if sorted(N) == sorted([1, 9, 7, 4]):
        print("YES")
    else:
        print("NO")


if __name__ == "__main__":
    main()

Solution (Python):
print("YES" if [1, 4, 7, 9] == sorted(map(int, input().split())) else "NO")

Solution (Python):
Ns = input().split()

print('YES' if set(Ns) == set('1974') else 'NO')

Solution (Python):
arr = list(input().split())
if ''.join(sorted(arr)) == '1479':
  print('YES')
else:
  print('NO')

Solution (Python):
n = list(map(int, input().split()))
if (1 in n) and (9 in n) and (7 in n) and 4 in n:
    print("YES")
else:
    print("NO")

Solution (Python):
n = list(map(int, input().split()))
if 1 in n and 9 in n and 7 in n and 4 in n:
    print('YES')
else:
    print('NO')

Solution (Python):



x=list(map(int,input().split())) 

print('YNEOS'[not(x.count(1)and x.count(9) and x.count(7) and x.count(4))::2])

Solution (Python):
N = set(map(int, input().split()))
if N == set([1, 9, 7, 4]):
	print("YES")
else:
	print("NO")

Solution (Python):
N = list(map(int, input().split()))
if 1 in N and 7 in N and 9 in N and 4 in N:
    print('YES')
else:
    print('NO')

Solution (Python):
import sys
input = sys.stdin.readline
a,b,c,d = input().split()
a = int(a)
b = int(b)
c = int(c)
d = int(d)
list = [a,b,c,d]
if 1 in list and 9 in list and 7 in list and 4 in list:
    print("YES")
else:
    print("NO")

Solution (Python):
s = [int(e) for e in input().split()]
l = [1,4,7,9]
s.sort()
if s == l:
    ans = "YES"
else:
    ans = "NO"
print(ans)

Solution (Python):
l=list(map(int,input().split()))
if 1 in l and 9 in l and 7 in l and 4 in l:
  print("YES")
else:
  print("NO")

Solution (Python):

import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(10000)


def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N):
    if 1 not in N:
        return "NO"
    if 9 not in N:
        return "NO"
    if 7 not in N:
        return "NO"
    if 4 not in N:
        return "NO"
    return 'YES'


def main():
    N = read_int_n()
    print(slv(N))


if __name__ == '__main__':
    main()

Solution (Python):
l=list(sorted(map(int,input().split())))
if l[0]==1 and l[1]==4 and l[2]==7 and l[3]==9:
    print("YES")
else:
    print("NO")

Solution (Python):


A = list(map(int, input().split()))
res = True
if 1 not in A:
    res = False
if 9 not in A:
    res = False
if 7 not in A:
    res = False
if 4 not in A:
    res = False
if res:
    print('YES')
else:
    print('NO')

Solution (Python):
N = [int(i) for i in input().split()]

N.sort()

if N[0] == 1 and N[1] == 4 and N[2] == 7 and N[3] == 9:
    print('YES')
else:
    print('NO')

Solution (Python):
N = list(map(int,input().split()))
if (1 in N)and(7 in N)and(9 in N)and(4 in N):
    print("YES")
else:
    print("NO")

Solution (Python):


N = list(map(int, input().split()))
if 1 in N and 9 in N and 7 in N and 4 in N:
    print("YES")
else:
    print("NO")

Solution (Python):
N = "".join(map(str, sorted(map(int, input().split()))))
print("YES" if N == "1479" else "NO")

Solution (Python):
str = list(input().split())
str.sort()
if str == ['1', '4', '7', '9']:
    print('YES')
else:
    print('NO')

Solution (Python):
n=set(input().split())
print("YES" if n=={"1","9","7","4"} else "NO")

Solution (Python):
s = [n for n in input().split()]

if "".join(sorted(s)) == "1479":
    print("YES")
else:
    print("NO")

Solution (Python):
n = set(map(int, input().split()))
if n == set([1, 4, 7, 9]):
  print("YES")
else:
  print("NO")

Solution (Python):
N = list(map(int,input().split(" ")))
if (1 in N)and(9 in N)and(7 in N)and(4 in N):
    print("YES")
else:
    print("NO")

Solution (Python):
n = list(map(int, input().split()))

ans = 'NO'
if 1 in n and 9 in n and 7 in n and 4 in n:
    ans = 'YES'

print(ans)

Solution (Python):
a = list(map(int, input().split()))
if a.count(1) == 1 and a.count(7) == 1 and a.count(9) == 1 and a.count(4) == 1:
    print("YES")
else:
    print("NO")

Solution (Python):
line=input().split()

print('YES' if '1' in line and '9' in line and '7' in line and '4' in line else 'NO')

Solution (Python):
n = list(map(int, input().split(" ")))

if(1 in n and 9 in n and 7 in n and 4 in n):
    print("YES")
else: print("NO")

Solution (Python):

N14 = list(sorted(list(input().split())))

if "".join(N14) == "1479":
    print("YES")
else:
    print("NO")

Solution (Python):
s=int(''.join(sorted(input().split())))
if s==1479:
    print('YES')
else:
    print('NO')

Solution (Python):
a=list(map(int,input().split()))
a.sort()
print("YES" if a==[1,4,7,9]else "NO")

Solution (Python):
N=input().split()
if "1" in N and "9" in N  and "7" in N and "4" in N:
  print('YES')
else:
  print('NO')

Solution (Python):

def main():
    buf = input()
    buflist = buf.split()
    N = list(map(int, buflist))
    if 1 in N and 9 in N and 7 in N and 4 in N:
        print("YES")
    else:
        print("NO")

if __name__ == '__main__':
    main()

Solution (Python):



 
import sys
import math



 

fileoperation=0
if(fileoperation):
    orig_stdout = sys.stdout
    orig_stdin = sys.stdin
    inputfile = open('W:/Competitive Programming/input.txt', 'r')
    outputfile = open('W:/Competitive Programming/output.txt', 'w')
    sys.stdin = inputfile
    sys.stdout = outputfile


mod=1000000007
 

def nospace(l):
    ans=''.join(str(i) for i in l)
    return ans
 
 
 

t=1
for tt in range(t):
    
    
    a=list(map(int,sys.stdin.readline().split(' ')))
    a.sort()
    if(a[0]==1 and a[1]==4 and a[2]==7 and a[3]==9):
    	print("YES")
    else:
    	print("NO")
    
    

if(fileoperation):
    sys.stdout = orig_stdout
    sys.stdin = orig_stdin
    inputfile.close()
    outputfile.close()

Solution (Python):

if sorted(int(_) for _ in input().split()) == [1,4,7,9]:
    print("YES")
else:
    print("NO")

Solution (Python):
N = list(map(int, input().split()))

if N.count(1) * N.count(9) * N.count(7) * N.count(4) == 1:
    print("YES")

else:
    print("NO")

Solution (Python):
a = set(map(int, input().split()))

if a == {1, 9, 7, 4}:
    print("YES")
else:
    print("NO")

Solution (Python):

import sys
input = sys.stdin.readline

lst_N = list(map(int, input().split()))
if 1 in lst_N and 9 in lst_N and 7 in lst_N and 4 in lst_N:
    print("YES")
else:
    print("NO")

Solution (Python):
A = list(input().split())
if "1" in A and "9" in A and "7" in A and "4" in A:
    print("YES")
else:
    print("NO")

Solution (Python):
def i1():
 return int(input())
def i2():
 return [int(i) for i in input().split()]
n=i2()
n.sort()
if n==[1,4,7,9]:
   print("YES")
else:
   print("NO")

Solution (Python):
a = list(map(int,input().split()))
a.sort()
if a[0] == 1 and a[1] == 4 and a[2] == 7 and a[3] == 9:
    print('YES')
else:
    print('NO')

Solution (Python):
series = list(map(int,input().split()))
if 1 in series and 9 in series and  7 in series and 4 in series:
	print("YES")
else:
	print("NO")

Solution (Python):
a = list(map(int, input().split()))

a.sort()

if a==[1, 4, 7, 9]:
    print('YES')
else:
    print('NO')

Solution (Python):
A = list(map(int,input().split()))

if 1 in A and 9 in A and 7 in A and 4 in A:
  print("YES")
else:
  print("NO")

Solution (Python):
n = list(map(int, input().split()))
n.sort()
if n[0] == 1 and n[1] == 4 and n[2] == 7 and n[3] == 9:
 print("YES")
else:
 print("NO")

Solution (Python):
A=list(map(int, input().split(" ")))
if 1 in A and 9 in A and 7 in A and 4 in A:
    print("YES")
else:
    print("NO")

Solution (Python):

N1, N2, N3, N4 = map(int, input().split())

if sorted([N1, N2, N3, N4]) == [1, 4, 7, 9]: print('YES')
else: print('NO')

Solution (Python):
l=list(map(int,input().split()))
c=0
if 1 in l:c+=1
if 9 in l:c+=1
if 7 in l:c+=1
if 4 in l:c+=1
if c==4:print('YES')
else:print('NO')

Solution (Python):
N = set(map(int, input().split()))
correct = {1,9,7,4}

if N == correct:
    print("YES")
else:
    print("NO")

Solution (Python):
n = list(map(int, input().split()))
if 1 in n and 7 in n and 9 in n and 4 in n:
    print("YES")
else:
    print("NO")

Solution (Python):
import sys
stdin = sys.stdin
 
sys.setrecursionlimit(10**5) 
 
def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

n = list(li())
a = [1,9,7,4]
ans = True
for ai in a:
    if not ai in n:
        ans = False
        
print("YES") if ans else print("NO")

Solution (Python):
n=list(map(int,input().split()))
n.sort()
if n==[1,4,7,9]:
    print("YES")
else:
    print("NO")

Solution (Python):

s = set(map(int, input().split()))

if 1 in s and 9 in s and 7 in s and 4 in s:
    print("YES")
else:
    print("NO")

Solution (Python):
l=input().split()
if "1" in l and "9" in l and "7" in l and "4" in l:
  print("YES")
else:
  print("NO")

Solution (Python):
a,b,c,d=map(int,input().split())
A=[a,b,c,d]
A.sort()
if A==[1,4,7,9]:
  print("YES")
else:
  print("NO")

Solution (Python):
def getN():
    return int(input())

def getMN():
    a = input().split()
    b = [int(i) for i in a]
    return b[0],b[1]

def getlist():
    a = input().split()
    b = [int(i) for i in a]
    return b

inp = map(int, input().split())
ins = list(set(inp))

if 1 in ins and 9 in ins and 7 in ins and 4 in ins:
    print("YES")

else:
    print("NO")

Solution (Python):
a = map(int,raw_input().split())
arr = [0]*(10)
for i in range(4):
	arr[a[i]]+= 1
if arr[1] == 1 and arr[9] == 1 and arr[7] == 1 and arr[4] == 1:
	print "YES"
else:
	print "NO"

Solution (Python):
Ns = list(map(int,input().strip().split()))

if 9 in Ns and 1 in Ns and 7 in Ns and 4 in Ns:
    print("YES")
else:
    print("NO")

Solution (Python):
a = list(input().split())
if a.count("1")==1 and a.count("7")==1 and a.count("9")==1 and a.count("4")==1:
    print("YES")
else:
    print("NO")

Solution (Python):
s = input().split()
if '1' in s and '9' in s and '7' in s and '4' in s:
  print('YES')
else:
  print('NO')

Solution (Python):


a = list(map(int, input().split()))

if 1 in a and 9 in a and 7 in a and 4 in a:
    print("YES")
else:
    print("NO")

Solution (Python):



a = [int(i) for i  in input().split()]

if 1 in a and 9 in a and 7 in a and 4 in a:
    print('YES')
else:
    print('NO')

Solution (Python):
S = input()
if "1" in S and '9' in S and '7' in S and '4' in S:
    print('YES')
else:
    print('NO')

Solution (Python):
def main():
    N = list(map(str, input().split()))
    N.sort()
    if "".join(N) == "1479":
        print("YES")
    else:
        print("NO")


if __name__ == "__main__":
    main()

Solution (Python):
import numpy as np

n = list(map(int, input().split()))

if 1 in n and 9 in n and 7 in n and 4 in n:
    print('YES')
else:
    print('NO')

Solution (Python):
s = input().split()

d = ""
for c in s:
    d+= c

if '1' in d and '9' in d and '7' in d and '4' in d:
    print("YES")
else:
    print("NO")

Solution (Python):
n = [int(i) for i in input().split()]
n.sort()
if n[0] == 1 and n[1] == 4 and n[2] == 7 and n[3] == 9:
    print("YES")
else:
    print("NO")

Solution (Python):
import math as mt
import itertools as it
import functools as ft
import random as rnd

stdin = lambda type_ = "int", sep = " ": list(map(eval(type_), input().split(sep)))
joint = lambda sep = " ", *args: sep.join(str(i) if type(i) != list else sep.join(map(str, i)) for i in args)

a = stdin()

print("YES" if set(a) == set([1,9,7,4]) else "NO")

Solution (Python):
N=map(int,raw_input().split())
N.sort()
if N==[1,4,7,9]:
    print "YES"
else:
    print "NO"

Solution (Python):
a,b,c,d = (int(i) for i in input().split())
s = []
s.append(a)
s.append(b)
s.append(c)
s.append(d)
if 1 in s and 9 in s and 7 in s and 4 in s:
    print("YES")
else:
    print("NO")

Solution (Python):
l=list(map(int,input().split()))
if l.count(1)>0 and l.count(9)>0 and l.count(7)>0 and l.count(4)>0:
  print('YES')
else:
  print('NO')

Solution (Python):
l = map(int, raw_input().split())
if 1 in l and 9 in l and 7 in l and 4 in l:
	print 'YES'
else:
	print 'NO'

Solution (Python):
A = list(map(int, input().split()))
A.sort()

if A == [1,4,7,9]:
  print("YES")
else:
  print("NO")

Solution (Python):
print "YES" if sorted(map(int, raw_input().split()))==[1,4,7,9] else "NO"

Solution (Python):
N1, N2, N3, N4 = [int(i) for i in input().split()]
if sorted([N1, N2, N3, N4]) == [1, 4, 7, 9]:
    ans = 'YES'
else:
    ans = 'NO'
print(ans)

Solution (Python):

Nn = list(map(int, input().split()))

if 1 in Nn and 9 in Nn and 7 in Nn and 4 in Nn:
    print("YES")
else:
    print("NO")

Solution (Python):
a = list(map(int, input().split()))

if 1 in a and 7 in a and 9 in a and 4 in a:
    print("YES")
else:
    print("NO")

Solution (Python):
N = set(map(int, input().split()))

if N == set([1, 4, 9, 7]):
    print('YES')
else:
    print('NO')

Solution (Python):
A = [int(x) for x in input().split()]
A.sort()
print('YES' if A == [1, 4, 7, 9] else 'NO')

Solution (Python):
a,b,c,d = map(int, input().split())
tmp = [a,b,c,d]
if 1 in tmp and 9 in tmp and 7 in tmp and 4 in tmp:
    print("YES")
else:
    print("NO")

Solution (Python):
import sys
input = sys.stdin.readline

n = list(map(int, input().split()))
n.sort()

if n[0] == 1 and n[1] == 4 and n[2] == 7 and n[3] == 9:
    print("YES")
else:
    print("NO")

Solution (Python):
A = sorted(list(map(int, input().split())))
if A == [1, 4, 7, 9]:
    print('YES')
else:
    print('NO')

Solution (Python):
N = [int(_) for _ in input().split()]

if 1 in N and 9 in N and 7 in N and 4 in N:
    print("YES")
else:
    print("NO")

Solution (Python):
l = map(int, raw_input().split())
if sorted(l) == [1,4,7,9]:
	print "YES"
else:
	print "NO"

Solution (Python):
A = [int(i) for i in input().split()]

if 1 in A and 9 in A and 7 in A and 4 in A:
    print('YES')
else:
    print('NO')

Solution (Python):
n = list(map(int, input().split()))
n = sorted(n)
n = "".join(map(str, n))
if n == '1479':
    print('YES')
else:
    print("NO")

Solution (Python):
from collections import deque
import sys




a = list(map(int,input().split()))
a.sort()
if a == [1,4,7,9]:
    print("YES")
else:
    print("NO")

Solution (Python):
ns = [int(n) for n in input().split()]
if sorted(ns) == sorted((1, 9, 7, 4)):
    print("YES")
else:
    print("NO")

Solution (Python):
N_list = sorted([int(elem) for elem in input().split()])
if N_list[0] != 1:
    print("NO")
elif N_list[1] != 4:
    print("NO")
elif N_list[2] != 7:
    print("NO")
elif N_list[3] != 9:
    print("NO")
else:
    print("YES")

Solution (Python):
s = list(map(int, input().split()))

if 1 in s and 7 in s and 9 in s and 4 in s:
    print('YES')
else:
    print('NO')

Solution (Python):
input = list(map(int,input().split()))
input.sort()
if input == [1,4,7,9]:
    print("YES")
else:
    print("NO")

Solution (Python):
n = [int(_) for _ in input().split()]
n_sorted = sorted(n)
if n_sorted[0] == 1 and n_sorted[1] == 4 and n_sorted[2] == 7 and n_sorted[3] == 9:
    print('YES')
else:
    print('NO')

Solution (Python):
n = list(map(int, input().split()))
if 1 in n and 9 in n and 7 in n and 4 in n:
    print("YES")
else:
    print("NO")

Solution (Python):
a = list(map(int, input().split()))
a = sorted(a)
if a == [1, 4, 7, 9]:
    print("YES")
else:
    print("NO")

Solution (Python):
s=list(map(int,input().split()))
if 1 in s and 9 in s and 7 in s and 4 in s:
    print('YES')
else:
    print('NO')

Solution (Python):
s = input()
if s.count("1") == 1 and s.count("9") >= 1 and s.count("7") >= 1 and s.count("4") >= 1:
    print("YES")
else:
    print("NO")

Solution (Python):
N=list(map(int,input().split()))
N.sort()
if N==[1,4,7,9]:
    print("YES")
else:
    print("NO")

Solution (Python):
A = [int(_) for _ in input().split()]

if 1 in A and 9 in A and 7 in A and 4 in A:
    print("YES")
else:
    print("NO")

Solution (Python):
n = list(map(int, input().split()))

bl = True
for v in 1, 9, 7, 4:
    if v not in n:
        bl = False
        break

print('YES' if bl else 'NO')

Solution (Python):
N = list(map(int, input().split()))
if N.count(1) == 1 and N.count(7) == 1 and N.count(9) == 1 and N.count(4) == 1:
	print("YES")
else:
	print("NO")

Solution (Python):
import sys

sys.setrecursionlimit(10000)







S = input()

if S.count("1") == 1 and S.count("9") and S.count("7") and S.count("4"):
    print("YES")
else:
    print("NO")

Solution (Python):
n1,n2,n3,n4 = list(map(int,input().split()))

n = [n1,n2,n3,n4]

if 1 in n and 9 in n and 7 in n and 4 in n:
    print("YES")
else:
    print("NO")

Solution (Python):
N1, N2, N3, N4 = map(int, input().split())
s = set([N1, N2, N3, N4])
if s == {1,9, 7,4}:
    print('YES')
else:
    print('NO')

Solution (Python):
a=sorted(map(int, input().split()))
if a==[1,4,7,9]:print('YES')
else:print('NO')

Solution (Python):
n=list(map(int,input().split()))
n.sort()
if n==[1,4,7,9]:print("YES")
else: print("NO")

Solution (Python):
n = list(map(int, input().split()))
n.sort()
if n[0] == 1 and n[1] == 4 and n[2] == 7 and n[3] == 9:
    print("YES")
else:
    print("NO")

Solution (Python):
N = [int(i) for i in input().split()]
N.sort()
if N == [1, 4, 7, 9]: print("YES")
else: print("NO")

Solution (Python):
int_list = [int(a) for a in input().split()]
if 1 in int_list and 4 in int_list and 7 in int_list and 9 in int_list:
    print("YES")
else:
    print("NO")

Solution (Python):
a = [int(x) for x in input().split()]
if all(x in a for x in [1, 9, 7, 4]):
    print("YES")
else:
    print("NO")

Solution (Python):

n = input()


if all(n.count(str(i)) for i in ["1","9","7","4"]):
    print("YES")
else:
    print("NO")

Solution (Python):



import array
from bisect import *
from collections import *
import fractions
import heapq 
from itertools import *
import math
import random
import re
import string
import sys

nums = sorted(list(map(int, input().split())))
if nums == [1, 4, 7, 9]:
    print("YES")
else:
    print("NO")

Solution (Python):
def inpl(): return [int(i) for i in input().split()]
if sorted(inpl()) == [1, 4, 7, 9]:
    print('YES')
else:
    print('NO')

Solution (Python):


import sys


INF = float('inf')
MOD = 10 ** 9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()


N = LI()
for i in [1,7,9,4]:
    if i not in N:
        print('NO')
        exit()

print('YES')

Solution (Python):
n = [i for i in input().split()]
if "1" in n and "9" in n and "7" in n and "4" in n :
    print("YES")
else:
    print("NO")

Solution (Python):
A=list(map(int,input().split()))

if 1 in A and 7 in A and 9 in A and 4 in A:
    print("YES")
else:
    print("NO")

Solution (Python):
a = set(map(int,input().split()))
if 1 in a and 7 in a and 9 in a and 4 in a:
    print('YES')
else:
    print('NO')

Solution (Python):
L = list(map(int,input().split()))

L = sorted(L)

if (L == [1,4,7,9]) :
    print("YES")
else :
    print("NO")

Solution (Python):
N = map(int, raw_input().split())
print "YES" if set(N)==set([1,9,7,4]) else "NO"

Solution (Python):
N = list(map(int,input().split()))
if 1 in N and 4 in N and 7 in N and 9 in N:
    print("YES")
else:
    print("NO")

Solution (Python):
n = set(map(int, input().split()))
if n==set([1,9,7,4]):
    print("YES")
else:
    print("NO")

Solution (Python):
N=[int(i) for i in input().split()]
N.sort()
if N==[1,4,7,9]:
    print('YES')
else:
    print('NO')

Solution (Python):
a = list(map(int,input().split()))
if 1 in a and 9 in a and 7 in a and 4 in a:
    print('YES')
else:
    print('NO')

Solution (Python):
a = list(map(int, input().split()))
a.sort()

if a == [1, 4,7,9]:
    print("YES")
else:
    print("NO")

Solution (Python):
def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]






l = list(map(int, input().split()))
l.sort()
if l == [1,4,7,9]:
    print("YES")
else:
    print("NO")

Solution (Python):
A = set(map(int, input().split()))
print("YES" if A == {1, 9, 7, 4} else "NO")

Solution (Python):
n = list(map(int, input().split()))
n.sort()
if n == [1, 4, 7, 9]:
    print("YES")
else:
    print("NO")

Solution (Python):
n = [int(i) for i in input().split()]
n.sort()
if n == [1,4,7,9]:
    print("YES")
else:
    print("NO")

Solution (Python):
N = list(map(int, input().split()))

if 1 in N and 9 in N and 7 in N and 4:

    print('YES')
else:
    print('NO')

Solution (Python):

from sys import stdin


s_in = lambda: stdin.readline()[:-1]  
d_in = lambda: int(stdin.readline())  
ds_in = lambda: list(map(int, stdin.readline().split()))  


N = s_in()
if ('1' in N) and ('9' in N) and ('7' in N) and ('4' in N):
    print('YES')
else:
    print('NO')

Solution (Python):
L = list(map(int, input().split()))

if 1 in L and 9 in L and 7 in L and 4:
    print('YES')
else:
    print('NO')

Solution (Python):
S=sorted([int(i) for i in input().split()])
T=sorted([1,7,9,4])
for i in range(4):
    if S[i]!=T[i]:
        print("NO")
        exit()
print("YES")

Solution (Python):

import sys

input=sys.stdin.readline
mii=lambda:map(int,input().split())

a=sorted(mii())

print("YES" if a==[1,4,7,9] else "NO")

Solution (Python):
N = input()

if '1' in N and '9' in N and '7' in N and '4' in N:
    print('YES')
else:
    print('NO')

Solution (Python):
from sys import exit, setrecursionlimit, stderr
from functools import reduce
from itertools import *
from collections import defaultdict, Counter
from bisect import bisect

setrecursionlimit(10**7)

def read():
  return int(input())

def reads():
  return [int(x) for x in input().split()]

Ns = reads()
ans = 1 in Ns and 9 in Ns and 7 in Ns and 4 in Ns
print("YES" if ans else "NO")

Solution (Python):
A = list(map(int, input().split()))
if sorted(A) == [1, 4, 7, 9]:
    print("YES")
else:
    print("NO")

Solution (Python):
a = list(map(int, input().split()))
print('YES' if sorted(a) == sorted([1, 9, 7, 4]) else 'NO')

Solution (Python):
X = sorted([int(a) for a in input().split()])

if X == [1,4,7,9]:
    print("YES")
else:
    print("NO")

Solution (Python):
s = input().split()
print('YES' if '1' in s and '9' in s and '7' in s and '4' in s else 'NO')

Solution (Python):
n1, n2, n3, n4 = map(int, input().split())
if {n1, n2, n3, n4} == {1, 9, 7, 4}:
	print("YES")
else:
	print("NO")

Solution (Python):
l = list(map(int,input().split()))
l = sorted(l)
if l == [1,4,7,9]:
    print('YES')
else:
    print('NO')