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



Sample input:
1 7 9 4


Sample output:
YES

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
N = list(map(int, input().split()))
N.sort()
print(['NO','YES'][''.join(map(str, N)) == '1479'])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
# coding: utf-8

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

N = sorted(N)

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

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
#n = int(input())
#=map(int,input().split()) #横並び
#x=[int(input()) for i in range(3)] #縦に並んだのを配列に
x=list(map(int,input().split())) #横に並んだのを配列に
#print(n)
print('YNEOS'[not(x.count(1)and x.count(9) and x.count(7) and x.count(4))::2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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()

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
#a, b,c ,d = map(int, input().split())
#m = int(input())
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')

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:


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")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
# A
N14 = list(sorted(list(input().split())))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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()

Submission status: Accepted

Solution code:
#JMD
#Nagendra Jha-4096

 
import sys
import math

#import fractions
#import numpy
 
###File Operations###
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

###Defines...###
mod=1000000007
 
###FUF's...###
def nospace(l):
    ans=''.join(str(i) for i in l)
    return ans
 
 
 
##### Main ####
t=1
for tt in range(t):
    #n=int(input())
    #n,k,s= map(int, sys.stdin.readline().split(' '))
    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")
    
    
#####File Operations#####
if(fileoperation):
    sys.stdout = orig_stdout
    sys.stdin = orig_stdin
    inputfile.close()
    outputfile.close()

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

a.sort()

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
# encoding: utf-8
N1, N2, N3, N4 = map(int, input().split())

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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"

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3

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")

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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')

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
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'

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import deque
import sys
#sys.setrecursionlimit(200000)
#input = sys.stdin.readline
#n = int(input())
#x,y = map(int,input().split())
a = list(map(int,input().split()))
a.sort()
if a == [1,4,7,9]:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10000)

# N = int(input())
# A = [int(x) for x in input().split()]
# V = [[0] * 100 for _ in range(100)]

#N = [int(x) for x in input().split()]

S = input()

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:

n = input()


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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

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")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding:utf-8

import sys
# from collections import Counter, defaultdict

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')

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

L = sorted(L)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

# n = int(input())
# a, b
# s = input()


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from sys import stdin
# import numpy as np

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


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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:

import sys
#sys.stdin=open("data.txt")
input=sys.stdin.readline
mii=lambda:map(int,input().split())

a=sorted(mii())

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

Submission status: Accepted

Solution code:
N = input()

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Runtime Error

Solution code:
N=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')

Submission status: Runtime Error

Solution code:

N=list(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')

Submission status: Runtime Error

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