Problem:


Score : 100 points

Problem Statement

Iroha loves Haiku. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with 5, 7 and 5 syllables, in this order.

To create a Haiku, Iroha has come up with three different phrases. These phrases have A, B and C syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.

Constraints

1≦A,B,C≦10

Input

The input is given from Standard Input in the following format:

A B C

Output

If it is possible to construct a Haiku by using each of the phrases once, print YES (case-sensitive). Otherwise, print NO.

Sample Input 1

5 5 7

Sample Output 1

YES

Using three phrases of length 5, 5 and 7, it is possible to construct a Haiku.

Sample Input 2

7 7 5

Sample Output 2

NO



Sample input:
5 5 7


Sample output:
YES

Submission status: Accepted

Solution code:
s = raw_input().split()

if s.count('5') == 2 and s.count('7') == 1:
 print 'YES'
else:
 print 'NO'

Submission status: Accepted

Solution code:
ls = map(int, raw_input().split())
ls.sort()
if ls[0] == 5 and ls[1] == 5 and ls[2] == 7:
  print "YES"
else:
  print "NO"

Submission status: Accepted

Solution code:
a, b, c = sorted([int(x) for x in input().split()])
print('YES' if a == b == 5 and c == 7 else 'NO')

Submission status: Accepted

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

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
iroha=[a,b,c]

if iroha.count(2)==5 and iroha.count(1)==7:
  print("YES")
else:
  prnt("NO")

Submission status: Runtime Error

Solution code:
import math

total = list(map(lambda x: int(x), input().split()))
possible = list({0,1,2,3,4,5,6,7,8,9} - set(list(map(lambda x: int(x), input().split()))))
yen = [int(d) for d in str(total[0])]

i = 0
if yen[0] == 9 and 9 not in possible:
    zeros = [0] * len(yen)
    yen = [1] + zeros
    print(int(''.join(map(str, yen))))


while i < len(yen):
    if yen[i] not in possible:
        if yen[i] == 9 and i != 0:
            yen[i - 1] += 1
            for i in range(i, len(yen)):
                yen[i] = 0
        elif yen[i] != 9:
            for j in possible:
                if j > i:
                    yen[i] = j
    i = i + 1
        
                
                
            
            




print(int(''.join(map(str, yen))))

Submission status: Runtime Error

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

a,sort()
print('YES' if a[0] == 5 and a[1] == 5 and a[2] == 7 else 'NO')

Submission status: Runtime Error

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

a=int(input())
b=int(input())
c=int(input())

if 7 == a:
    if 5 == b and 5 == c:
        print("YES", end="\n")
elif 5 == a:
    if (7 == b and 5 == c) or (5 == b and 7 == c):
        print("YES", end="\n")
else:
    print("NO", end="\n")

Submission status: Runtime Error

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

a=int(input())
b=int(input())
c=int(input())

if 7 == a:
    if 5 == b and 5 == c:
        print("YES")
elif 5 == a:
    if (7 == b and 5 == c) or (5 == b and 7 == c):
        print("YES")
else:
    print("NO")

Submission status: Runtime Error

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

a=int(input())
b=int(input())
c=int(input())

if 7 == a:
    if 5 == b and 5 == c:
        print("Yes")
elif 5 == a:
    if (7 == b and 5 == c) or (5 == b and 7 == c):
        print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
a, b, c = [int(x) for x in in input().split()]

if sorted([a, b, c]) == [5, 5, 7]: print("YES")
else: print("NO")

Submission status: Runtime Error

Solution code:
l = [int(x) for x in input().split()]
l = sorted(l)
if l.count(5)==2 and l.count(7)==1:
  print("YES")
else:
  print("NO"

Submission status: Runtime Error

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

for  i in a:
  if i=="5":
    num_5 = num_5+1
  if i=="7":
    num_7 = num_7+1

if num_5=2 and num_7=1:
  print "YES"
else:
  print "NO"

Submission status: Runtime Error

Solution code:
A, B, C = map(int, input())

num5 = 0
num7 = 0
ans = 'NO'

for num in [A, B, C]:
  if num == 5:
    num5+=1
  elif num == 7:
    num7+=1
  else:
    break
if num5 ==2 and num7 == 1:
  ans = 'YES'
print(ans)

Submission status: Runtime Error

Solution code:
x = input().split()
fn = 0
sn = 0

for i in range(len(x)):
  if int(x[i]) == 5:
    fn += 1
  elif int(x[i]) == 7:
    sn += 1

if fn = 2:
  if sn = 5:
    print("YES")
  else:
    print("NO")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
x = input().stlip()
fn = 0
sn = 0

for i in range(len(x)):
  if int(x[i]) == 5:
    fn += 1
  elif int(x[i]) == 7:
    sn += 1

if fn = 2:
  if sn = 5:
    print("YES")
  else:
    print("NO")
else:
  print("NO")

Submission status: Runtime Error

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

if a=5, b=5, c=7:
  print("Yes")
elif a=5, b=7, c=5:
  print("Yes")
elif a=7, b=5, c=5:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

if __name__ == "__main__":
    str_sum = sum([map(int, input().split())])
    if str_sum == 17:
        print('YES')
    else:
        print('NO')

Submission status: Runtime Error

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


def validate(strNum):
    for i in strNum:
        if i in d:
            return
    print(strNum)
    exit()


for i in range(0, 1000000):
    validate(str(n))
    n += 1

Submission status: Runtime Error

Solution code:


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


def validate(strNum):
    for i in strNum:
        if i in d:
            return False
    print(strNum)
    exit()


for i in range(0, 10001):
    _ = validate(str(n))
    n += 1

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
P = 10**9+7
fac = [1]
ifac = [1]
ff = 1
for i in range(1,200001):
  ff *= i
  ff %= p
  fac.append(ff)
  ifac.append(pow(ff, p-2, p))
def ncr(n, r, p): 
  return (fac[n] * ifac[r] % p * ifac[n-r] % p)

h,w,a,b = map(int,input().split())
s = 0
nC = b-1
kC = 0
nD = w-b-1+h-1
kD = h-1
for i in range(h-a):
  C = ncr(nC, kC, P)
  D = ncr(nD, kD, P)
  s = (s + C * D) % P
  nC += 1
  kC += 1
  kD -= 1
  nD -= 1
print(s)

Submission status: Runtime Error

Solution code:
# 042a

def atc_042a(input_value: str) -> str:
    ABC = input_value.split(" ")
    if ABC.count("5") == 2 and ABC.count("7") == 1:
        return "YES"
    return "NO"

Input_value_1 = input()
print(atc_042a(input_value_1))

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
c=[]

for i in range(a):
  c.append(input())

d=sorted(c)  
print(''.join(d))

Submission status: Runtime Error

Solution code:
def test(): 
  arr = input()
  arr = [int(i) for i in arr]
  arr = sorted(arr)
  if arr==[5, 5, 7]:
    print("YES")
  else:
    print("NO")  
test()

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
D = set(map(int, input().split()))
for ans in range(n,9999):
    for c in str(ans):
        if int(c) in D:
            break
    else:
        print(ans)
        break

Submission status: Runtime Error

Solution code:
abc=map(int,input().split())
if abc.count(5)==5 and abc.count(7)==1:
	print("YES")
else:
  	print("NO")

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
if((a*b*c)%7=0)and((a*b*c)/7=25):
	print("YES")
else:
  	print("NO")

Submission status: Runtime Error

Solution code:
def iroha(a,b,c):
    haiku = []
    haiku.append(len(a))
    haiku.append(len(b))
    haiku.append(len(c))
    if sum(haiku) == 17:
        if max(haiku) == 7:
            if min(haiku) == 5:
                return "Yes"
            else:
                return "No"
        else:
            return "No" 
    else:
        return "No"

print(iroha(a,b,c))

Submission status: Runtime Error

Solution code:
#include <stdio.h>


int main()
{
int A,B,C,d;
scanf("%d %d %d",&A,&B,&C);


if (A&&B==5&&C==7)
    printf("YES\n");
else if (A&&C==5&&B==7)
    printf("YES\n");
else if(A==7&&B&&C==5)
    printf("YES\n");
else
printf("NO\n");

return 0;
}

Submission status: Runtime Error

Solution code:
N, L = map(int, input().split())
S = sorted([input() for i in range(N)])
print(''.join(S))

Submission status: Runtime Error

Solution code:
A, B, C=list(map(int, input().split(" "))
if [A, B, C].count(5)==2 and [A, B, C].count(7)==1:
  print('Yes')
else:
  print('No'))

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
if a==b==5 and c==7:
  print('YES')
elif a==c==5 and b==7:
  print('YES')
elif b==c==5 amd c==7:
  print("YES")
else:
  print('NO')

Submission status: Runtime Error

Solution code:
A=int(input("Enter A:"))
B=int(input("Enter B:"))
C=int(input("Enter C:"))
if((A==5 and B==5 and C==7) or (A==5 and C==5 and B==7) or (B==5 and C ==5 and  A==7)):
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
A,B,C=map(int,input().sprit())
if sorted[A,B,C]=[5,5,7]:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
A=int(input("Enter A:"))
B=int(input("Enter B:"))
C=int(input("Enter C:"))
if((A==5 or B==5 or C==7) and(A==5 or C==5 or B==7) and(B==5 or C==5 or A==7)):
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
A=int(input("Enter A:"))
B=int(input("Enter B:"))
C=int(input("Enter C:"))
if ((A==5 or B==5 or C==7) and(A==5 or C==5 or B==7) and(B==5 or C==5 or A==7)):
   print("Yes")
else:
   print("No")

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=int(input())

if (A+B+C==17&&A,B,C==5 and 7):
  print("yes")
  
else:
  print("no")

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
S = set(input().split())
while True:
    L = list(str(N))
    for i in L:
        if i in S:
            break
    else:
        break
    N += 1
print(N)

Submission status: Runtime Error

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

success_cases = [(a[0], a[1], a[2]), (a[1], a[2], a[0]), a[2], a[0], a[1])]

for c in success_cases:
    if c == (5,7,5):
        print("YES")
        return
print("NO")

Submission status: Runtime Error

Solution code:
a, b, c = input(int())

if a, b, c == 5 & a, b, c = 7:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=int(input())

D=A+B+C

if D==17:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

Solution code:
1. s = input()
print("YES" if s.count("5") == 2 and s.count("7") == 1 else "NO")

Submission status: Runtime Error

Solution code:
A=int(input(A))
B=int(input(B))
C=int(input(C))

D=A+B+C
if D==17:
  print(YES)
else:
  print(NO)

Submission status: Runtime Error

Solution code:
# list に入力を格納
list = list(int, input().split())
# 小さい順に並び替え
list.sort()

if list[0] == 5 and list[1] == 5 and list[2] == 7:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
# list に入力を格納
list = list(map(int, input().split()))
# 小さい順に並び替え
list.sort()

if list[0] == 5 and list[1] == 5 and list[7] == 7:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:

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

list.sort()

if list[0] == 5 and list[1] == 5 and list[7] == 7:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
# list に入力を格納
list = list(int, input().split())
# 小さい順に並び替え
list.sort()

if list[0] == 5 and list[1] == 5 and list[7] == 7:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
if(a==5 & b==7 & c==5):
    print('yes')
elif(a==7 & b==5 & c==5):
    print('yes')
elif(a==5 & b==5 & c==7):
    print('yes')
else:
    print('no')

Submission status: Runtime Error

Solution code:
nums = map(int, input().split())
if nums.count(5) == 2 and nums.count(7) == 1:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
n,l = map(int,input().split())
string_list=[input() for i in range(n)]

string_list.sort()
for X in string_list:
  print(X, end="")

Submission status: Runtime Error

Solution code:
nums = map(int, input().split(" "))
if nums.count(5) == 2 and nums.count(7) == 1:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:

A = int(input())
B = int(input())
C = int(input())

if (A+B+C == 17):
    if (A*B*C == 175):
        if(A*B+B*C+C*A == 95):
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

Submission status: Runtime Error

Solution code:

A = int(input())
B = int(input())
C = int(input())

if (A+B+C == 15):
    if (A*B*C==175):
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())

if (A+B+C == 15):
    if (A*B*C==175):
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Runtime Error

Solution code:
L=input().split()
A,B,C=int(L[0]),int(L[1]),int(L[2])
X=set([5,7])
ans = []
for i in range(len(X)):
    ans.append([A,B,C].count(X[i]))
if ans == [2,1]:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input().split())
if a == 5 and b == 7 and c == 7) or (a == 7 and b == 5 and c == 7) or (a == 7 and b == 7 c == 5):
	print("YES")
else:
	print("NO")

Submission status: Runtime Error

Solution code:
A = input()
B = input()
C = input()

L = [A, B, C]

for x in L:
    if len(x) == 7:
        L.remove(x)
        for y in L:
            if len(y) != 5:
                break
        else:
            print("YES")
            break
else:
    print("NO")

Submission status: Runtime Error

Solution code:
def main():
    a, b, c = map(int, input().split())
    if sum(a, b, c) == 17:
        print('YES')
    else:
        print('NO')


if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

five = 0
seven = 0

for i in list:
  if i == 5:
    five += 1
  elif i == 7:
    seven += 1
  else:
      pass

if seven == 1 and five == 2:
  print(TRUE)
else:
    print(NO)

Submission status: Runtime Error

Solution code:
n,l=map(int,input().split())
s=sorted([input() for i in range(n)])
print("".join(s))

Submission status: Runtime Error

Solution code:
lst = list(map(int,input().split()))
for i in lst:
  ct = 0
	if i == 5:
      ct += 1
    elif i == 7:
      ct += 1
if ct == 3:
  return "YES"
else:
  return "NO"

Submission status: Runtime Error

Solution code:
a =list(map(int,input().split()))
if a+b+c ==19 and a.count("7") ==2:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
if a>b or b>c or a>c or a>b:
    print("NO")
else:
    print("YES")

Submission status: Runtime Error

Solution code:
S = int(input())

if S.count(5) == 2 && S.count(7):
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
def test():
  x=input()
  x=x.split()
  if x =['5','5','7']:
    print("YES")
  elif x =['5','7','5']:
    print("YES")
  elif x =['7','5','5']:
    print("YES")
  else:
    print("NO")

Submission status: Runtime Error

Solution code:
i = 0
k_n = []
k_n_all = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

p_price, k_number = map(int, input().split())
k_n = map(int, input().split())
result_number = list(set(k_n_all) - set(k_n))
result_price = p_price

while True:
    x = 0
    y = 0
    z = list(map(int, str(result_price)))
    while x < len(z):
        if z[x] in result_number:
            y += 0
        else:
            y += 1
        x += 1

    if y == 0:
        print(result_price)
        break
    else:
        result_price += 1

Submission status: Runtime Error

Solution code:
val1=list(map(int,input().split()))
val2=[input() for i in range(val1[0])]

val2.sort()
print("".join(val2))

Submission status: Runtime Error

Solution code:
val1=list(map(int,input().split()))
val2=[input() for i in range(val1[0])]

val2.sort()
print("".join(val2))

Submission status: Runtime Error

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

s.sort()

if s = ["5","5","7"]:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
s = map(int(input().split()))
if s.count('7') == 1 and s.count('5') == 2:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

Solution code:
a, b, c = map(int(input().split()))
if count(7) == 1 and count(5) == 2:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

Solution code:
N, L = map(int, input().split())
S = [input() for s in range(N)]
S.sort()
output = ""
for i in S:
  output+=i
prunt(output)

Submission status: Runtime Error

Solution code:
a,b,c = sorted(map(int, input().split()))
if (a+b+c==17)&(a==b)&(c==7):
  return("YES")
else:
  return("NO")

Submission status: Runtime Error

Solution code:
def main():
  1st = input()
  1st = 1st.split()
  1st.sort()
  if x == ["5", "5", "7"]:
    print("YES")
  else:
    print("NO")
    
    
main()

Submission status: Runtime Error

Solution code:
abc=list(map(int,input().split()))
abc.sort()
if a[0]==5 and a[1]==5 and a[2]==7:
    print("YES")
    exit()
print("NO")

Submission status: Runtime Error

Solution code:
n, l = map(int, input().split())
s = []
for _ in range(n):
    s.append(input())
s = sorted(s)
print(''.join(s))

Submission status: Runtime Error

Solution code:
A,B,C = int(input())
res = "NO"
if A == 5 or A == 7:
  if B == 5 or B == 7:
    if C == 5 or C == 7:
      if A+B+C == 17:
        res = "YES"
print(res)

Submission status: Runtime Error

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

for index, clause in enumerate(clause_list):
  if clause = 5:
    clause_list.pop(index)
    break

for index, clause in enumerate(clause_list):
  if clause = 7:
    clause_list.pop(index)
    break

for index, clause in enumerate(clause_list):
  if clause = 5:
    clause_list.pop(index)
    break

print('YES' if len(clause_list) == 0 else 'NO')

Submission status: Runtime Error

Solution code:
clause_list = list(map(int, input()))

for index, clause in enumerate(clause_list):
  if clause = 5:
    clause_list.pop(index)
    break
    
for index, clause in enumerate(clause_list):
  if clause = 7:
    clause_list.pop(index)
    break
    
for index, clause in enumerate(clause_list):
  if clause = 5:
    clause_list.pop(index)
    break
    
print('YES' if len(clause_list) == 0 else 'NO')

Submission status: Runtime Error

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

    counter5 = 0
    counter7 = 0

    for num in l:
        if num == 5:
            counter5+=1
        
        if num == 7:
            counter7+=1

    if counter5 == 2 and counter7 == 1:
        print("Yes")
    
    else:
        print("No")

Submission status: Runtime Error

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

    counter5 = 0
    counter7 = 0

    for num in input:
        if num == 5:
            counter5+=1
        
        if num == 7:
            counter7+=1

    if counter5 == 2 and counter7 == 1:
        print("Yes")
    
    else:
        print("No")

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
def main():
    # input = "5 7 7"
    input = list(map(int, input().split()))
    print(input)

    counter5 = 0
    counter7 = 0

    for num in input:
        if num == 5:
            counter5+=1
        
        if num == 7:
            counter7+=1

    if counter5 == 2 and counter7 == 1:
        print("Yes")
    
    else:
        print("No")



if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
input_line = input()
haiku = input_line(" ")

for i in haiku:
  if i != 5 and i != 7:
    print("NO")
  else:
    print("YES")

Submission status: Runtime Error

Solution code:
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import sys


def input():
    return sys.stdin.readline().strip()


def _main():
	input()
    s = sorted(list(input().split()))
    print("".join(s))


if __name__ == "__main__":
    _main()

Submission status: Runtime Error

Solution code:
N=input()
if N in '575'
    print('YES')
else :
    print('NO')

Submission status: Runtime Error

Solution code:
a = input().split()
b = input().split()
if a == b:
    print("yes")
else:
    print("no")

Submission status: Runtime Error

Solution code:
a = map(int, input().split())
b = map(int, input().split())
if a == b:
    print("yes")
else:
    print("no")

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
if a == b:
    print("yes")
else:
    print("no")

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
B = int(input())
b_5 = 0
b_7 = 0
if A == 5:
  b_5 += 1
elif A == 7:
  b_7 += 1
if B == 5:
  b_5 +=1
elif B==7:
  b_7 += 1
if C==5:
  b_5 +=1
elif C==7:
  b_7 += 1

if b_5 == 2 and b_7 == 1:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
A = input()
B = input()
B = input()
b_5 =0
b_7=0
if A == 5:
  b_5 += 1
elif A == 7:
  b_7 += 1
if B == 5:
  b_5 +=1
elif B==7:
  b_7 += 1
if C==5:
  b_5 +=1
elif C==7:
  b_7 += 1

if b_5 == 2 and b_7 == 1:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
a,b,c = map(int, input().split())
if a,b,c == 5,5,7 or a,b,c == 5,7,5 or a,b,c == 7,5,5:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
def haiku():
   a=int(input())
   b=int(input())
   c=int(input())
   x=[a,b,c]
   if x==[5,7,5] or x==[5,5,7] or x==[7,5,5] :
      print('yes')
   else:
      print('no')
            
            

haiku()

Submission status: Runtime Error

Solution code:
n = int(input())
print(n*(n+1)//2)

Submission status: Runtime Error

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

if len(a) == 7:
    if len(b) == 5 and len(c) == 5:
        print("Yes")
    else:
        print("No")
        
if len(b) == 7:
    if len(a) == 5 and len(c) == 5:
        print("Yes")
    else:
        print("No")

if len(c) == 7:
    if len(a) == 5 and len(b) == 5:
        print("Yes")
    else:
        print("No")

Submission status: Runtime Error

Solution code:
n, k = (input().split())
n = list(map(int, n));
dSet = set(map(int, input().split()))
okList = [i for i in range(10) if i not in dSet]
i = len(n)
while i >= 0:
    i -= 1
    if n[i] in okList:
        continue
    for y in okList:
        if n[i] < y:
            n[i] = y
            j = i+1
            while j < len(n):
                n[j] = okList[0]
                j += 1

            break
    else:
        if i - 1 < 0:
            n = [0] + n
            i += 1
        n[i - 1] += 1
        j = i
        while j < len(n):
            n[j] = okList[0]
            j += 1
print(int("".join(list(map(str, n)))))

Submission status: Runtime Error

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

seven = 0
five = 0

for i in range(data):
	if int(i) == 7:
		seven += 1
	elif int(i) == 5:
		five +=1

if seven == 1 and five == 2:
	print('YES')
else:
	print('NO')

Submission status: Runtime Error

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

for i in range(n):
    word = input()
    list.append(word)

list_connect = "".join(sorted(list))


print(list_connect)

Submission status: Runtime Error

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

for i in range(n):
    word = input()
    list.append(word)

list_connect = "".join(sorted(list))


print(list_connect)

Submission status: Runtime Error

Solution code:
l = [A, B, C]

for i in l:
  print(i)

Submission status: Runtime Error

Solution code:
from sys import stdin

A,B,C = [int(x) for x in stdin.realine().rstrip().split()]

if A+B+C == 17 and A>=5 and B>=5 and C>=5:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())

if A+B+C == 17 and A >= 5 and B >= 5 and C >= 5:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
stdin << A, B, C
lst = [A, B, C]
sl = sort(lst)
if sl[0] == 5 && sl[1] == 5 && sl[2] == 7
  print('YES')
else
  print('NO')

Submission status: Runtime Error

Solution code:
a, b, c = [int(3) for 3 in input().split() ]

mylist = [5, 7]

if ( a in mylist and b in mylist and c in mylist and a + b + c == 17 ):
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

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

num = num.sorted
if(num[0]==5 and num[1]==5 and num[2] == 7):
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
#ABC042B
N,L=map(int,input().split())

a=[]
for i in range(N)
    a.append(input())
    
a.sort()

print(''.join(a))

Submission status: Runtime Error

Solution code:
#ABC042B
N,L=map(int,input().split())

a=[]
for i in range(n)
    a.append(input())
    
a.sort()

print(''.join(a))

Submission status: Runtime Error

Solution code:
n,l=map(int,input().split())
s=sorted([input() for i in range(n)])
print(*s,sep="")

Submission status: Runtime Error

Solution code:
bunsetsu_set = {A, B, C}
lst575 = []
for bunsetsu1 in bunsetsu_set:
  lst575.append(bunsetsu1)
  bunsetsu_set.remove(bunsetsu1)
  for bunsetsu2 in bunsetsu_set:
    lst575.append(bunsetsu2)
    bunsetsu_set.remove(bunsetsu2)
    lst575.append(bunsetsu_set.pop())
    if lst575 == [5,7,5]:
      print('YES')
      break
    print('NO')

Submission status: Runtime Error

Solution code:
A,B,C = int(input().split())
X = A+B+C
if X ==17:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

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

for i in s:
  if i == 5:
    count5+=1
  else:
    count7+=1

if count5 == 2 and count7 == 1:
  print("YES")

else:
  print("NO")

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
  
int main() {
  int A,B,C;
  cin >> A>>B>>C;

  if(A==7 && B==5 && C==5){
    cout << "YES" << endl;
  }else if (A==7 && B==5 && C==5) {
    cout << "YES" << endl;
  }else if (A==5 && B==5 && C==7){
    cout << "YES" << endl;
  }else{
    cout << "NO" << endl;
  }
}

Submission status: Runtime Error

Solution code:
from sys import stdin

a = stdin.readline().rstrip()
 
 
b = [5,5,7]
c = [5,7,5]
d = [7,5,5]
 

if a == b:
    print(YES)
if a ==c:
    print(YES)
if a == d:
    print(YES)
else:
    print(NO)

Submission status: Runtime Error

Solution code:
from sys import stdin

a = stdin.readline().rstrip()
a_int = [int(i) for i in a]

 
b = [5,5,7]
c = [5,7,5]
d = [7,5,5]
 

if a_int == b:
    print("YES")
if a_int ==c:
    print("YES")
if a_int == d:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
from sys import stdin

a = stdin.readline().rstrip()

a_int = [int(a) for i in a]

b = [5,5,7]
c = [5,7,5]
d = [7,5,5]

def hantei():
  if a_int == b:
    print("YES")
  if a_int ==c:
    print("YES")
  if a_int == d:
    print("YES")
  else:
    print("NO")
  return

Submission status: Runtime Error

Solution code:
a = [input for i in range(3)]

b = [5,5,7]
c = [5,7,5]
d = [7,5,5]

if a == b:
  print(YES)
if a == c:
  print(YES)
if a == d:
  pritn(YES)
else:
  print(N0)

Submission status: Runtime Error

Solution code:
A,B,C= map(int, input().split())
i = A*100 + B*10 + C
if i==557 or i==575 or i= 755:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

Solution code:
N, L = list(map(int, input().strip().split()))
strl = [input().strip() for s in range(N)]
strl = sorted(strl)
s = ''
for t in strl:
  s += str(t)
print(s)

Submission status: Runtime Error

Solution code:
# Vicfred
# https://atcoder.jp/contests/abc042/tasks/abc042_a
# sorting
import algorithm, strutils, sequtils

var line = stdin.readLine.split.map(parseInt)
line.sort
if line == [5, 5, 7]:
  echo "YES"
else:
  echo "NO"

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3

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

paid = n
while True:
    st = set(int(x) for x in str(paid))
    l = len(st)
    if len([x for x in st if x not in D]) == l:
        print(paid)
        break
    paid += 1

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3

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

price = n
while True:
    st = set(int(x) for x in str(price))
    l = len(st)
    if len([x for x in st if x not in D]) == l:
        print(price)
        break
    price += 1

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3

import sys

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

for i in range(1, 100):
    total = n * i
    st = set(int(x) for x in str(total))
    l = len(st)
    if len([x for x in st if x not in D]) == l:
        print(total)
        break

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3

n, l = map(int, input().split())
s = []

for _ in range(n):
    s.append(str(input()))

print(''.join(sorted(s)))

Submission status: Runtime Error

Solution code:
import sys
import os

def judge_575(args):
    count5 = [int(x) for x in args ].count(5)
    count7 = [int(x) for x in args ].count(7)
    if count5 == 2 and count7 == 1:
        print('YES')
        return

    print('NO')

if __name__ == "__main__":
    if len(sys.argv) < 4:
        print('NO')
        os.exit(0)

    judge_575(sys.argv[1:])

Submission status: Runtime Error

Solution code:
s = input()
if s = "7 5 5" or "5 7 5" or "5 5 7":
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
N,L = map(int,input().split())
S = [input() for i_ in range(N)]
S.sort()
s = S[0]
for i in range(1,N):
    s += S[i]
print(s)

Submission status: Runtime Error

Solution code:
A = input()
B = input()
C = input()
if A == 5:
  print('YES')
elif B == 5:
  print('YES')
elif C == 7:
  print('YES')
else:
  print("NO")

Submission status: Runtime Error

Solution code:
L = sort(list(map(int, input().split())))
 
if L[0] == 5 and L[1] == 5 and L[2] == 7:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

Solution code:
n,l = map(int,input().split())
s = []

for i in range(n):
    s.append(input())

g = sorted(s)

print(''.join(g))

Submission status: Runtime Error

Solution code:
l,m,n = map(int, input().split())
newlist = sorted([l,m,n])
if newlist(1)==5 & newlist(2)==5 & newlist(3)==7:
    print(str(YES))
else print(str(NO))

Submission status: Runtime Error

Solution code:
a, b, c = int(input())

if (a + b + c) == 17:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
a, b, c = int(input())

if (a + b + c) == 19:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
if set(a,b,c)=={5,5,7}:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
A, B, C = map(int, input().split())

if A + B + C == 17:
  if (A = 5 or 7) and (B = 5 or 7) and (C = 5 or 7):
    print('YES')
  else:
    print('NO')
else:
  print('NO')

Submission status: Runtime Error

Solution code:
a = list(map(int, intput().split()))
a.sort()
if a = [5, 5, 7]:
  print("YES")
else:
  print("NO")