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: Runtime Error

Solution code:
a, b, c = map(int, input().split())
if sorted(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 set(a, b, c) == (5, 7) & a*b*c % 25 == 0:
  print(YES)
else:
  print(NO)

Submission status: Runtime Error

Solution code:
a = list(map(int, input().split()))
a.sort()
if (a[0] == 5 && a[1] == 5 && a[2] == 7):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a = map(int, input().split())
a.sort()
if (a[0] == 5 && a[1] == 5 && a[2] == 7):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
array = [int(i) for i in input().split()]

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x = map(int(), input().split())
x.sort()
if x[0] == 5 and x[1] == 5 and x[2]== 5:
  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 == 5:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

Solution code:
a = "5 5 7"
aa = a.split(" ")
aa.sort
if aa[0] == 5:
        if aa[1] == 5:
                if aa[2] == 7:
                        aaa = "a"
if aaa == "a":
        print("OK")
else:
        print("ng")

Submission status: Runtime Error

Solution code:
from collections import Counter
abc = input().rstrip()
c = COunter(abc)
if c['5'] == 2 and c['7'] == 1:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

Solution code:
numlist = list(map(int,input().split()))
if max(numlist) == 7 and min(numlist) == 5 and sum(sumlist) == 17:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

Solution code:
n,l=map(int,input().split())
s=[]
res=''
for i in range(n):
  s.append(input())
s.sort()
for k in range(n):
  res+=s[k]
print(res)

Submission status: Runtime Error

Solution code:
ABC=iuput()
if ABC.count('5')==2 and ABC.count('7')==1:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b, c = input().split()
abc = sorted([a, b, c])
ans = 'NO'
if abc[0] == '5' and abc[1] == '5' and = abc[2] == '7':
  ans = 'YES'
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
input = input().split()
count = 0
for num in input:
  if num == "7":
    count += 1

if count = 1:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*- 
price, K = map(int, input().split())
 
kirai_data =input().split()
#print(set(data))
 
lst = list(range(price,10001))
for min in lst:
   
    shugo = set(kirai_data) & set(list(str(min))) 
    if  len(shugo) == 0 :                         
        print(min)
        break
    else:
        continue

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*- 
price, K = map(int, input().split())
 
kirai_data =input().split()
#print(set(data))
 
lst = list(range(price,10001))
for min in lst:
   
    shugo = set(kirai_data) & set(list(str(min))) 
    if  len(shugo) != 0 :                         
        continue
    else:
      #print(price)
      print(min)
      break

Submission status: Runtime Error

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


number, length = map(int, input().split())
lst = []
for n in range(number):
    s = input()
    #print(s)
    lst.append(s)
    #print(lst)

lst.sort()
moji = ""
for n in lst:
    moji += n
print(moji)

Submission status: Runtime Error

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

number, length = map(int, input().split())
lst = []
for n in range(number):
    input = input()
    lst.append(input)

lst.sort()
moji = ""
for n in lst:
    moji += n
print(moji)

Submission status: Runtime Error

Solution code:
li = input().split().remove('5')
if '7' in li:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
#入力した整数が５、７、５であるならばTrueを返す
# int,int,int -> True 
 
x,y,z = (int(i) for i in input().split())
if x == 7:
    if y == z and y == 5 :
        print("YES")
    else:
        print("NO")
elif y == 7:
    if x == z and x == 5:
        print("YES")
    else:
        print("NO")
elif z == 7:
    if x == y and x == 5:
        print("YES")
    else:
        print("NO")
    else:
        print("NO")

Submission status: Runtime Error

Solution code:
#入力した整数が５、７、５であるならばTrueを返す
# int,int,int -> True 

x,y,z = int(input())
if x == 7:
    if y == z and y == 5 :
        print("YES")
    else:
        print("NO")
elif y == 7:
    if x == z and x == 5:
        print("YES")
    else:
        print("NO")
elif z == 7:
    if x == y and x == 5:
        print("YES")
    else:
        print("NO")
    else:
        print("NO")

Submission status: Runtime Error

Solution code:
#入力した整数が５、７、５であるならばTrueを返す
# int,int,int -> True 
x,y,z = int(input())

def check7(x,y,z):
    if x == 7:
        if y == z and y == 5 :
            print("YES")
        else:
            print("NO")
    elif y == 7:
        if x == z and x == 5:
            print("YES")
        else:
          print("NO")
    elif z == 7:
        if x == y and x == 5:
          print("YES")
        else:
          print("NO")
    else:
      print("NO")

Submission status: Runtime Error

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

cnt = 0
for i in A:
  if i != 7 or i !=5:
  	print('NO')
  else i == 7:
    cnt += 1

if cnt == 1:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

Solution code:
#入力した整数が５、７、５であるならばTrueを返す
# int,int,int -> True 

def check7(x,y,z):
    if x == 7:
        if y == z and y == 5 :
            print("YES")
        else:
            print("NO")
    elif y == 7:
        if x == z and x == 5:
            print("YES")
        else:
            print("NO")
    elif z == 7:
        if x == y and x == 5:
            print("YES")
        else:
            print("NO")
    else:
        print("NO")

if __name__ == "__main__":
    check7()

Submission status: Runtime Error

Solution code:
#入力した整数が５、７、５であるならばTrueを返す
# int,int,int -> True 

def check7(x,y,z):
    if x == 7:
        if y == z and y == 5 :
            print("YES")
        else:
            print("NO")
    elif y == 7:
        if x == z and x == 5:
            print("YES")
        else:
          print("NO")
    elif z == 7:
        if x == y and x == 5:
          print("YES")
        else:
          print("NO")
    else:
      print("NO")

if __name__ == "__main__":
    check7()

Submission status: Runtime Error

Solution code:
#入力した整数が５、７、５であるならばTrueを返す
# int,int,int -> True 

def check7(x,y,z):
    if x == 7:
        if y == z :
            print("YES")
        else:
            print("NO")
    elif y == 7:
        if x == z :
            print("YES")
        else:
          print("NO")
    elif z == 7:
        if x == y:
          print("YES")
        else:
          print("NO")
    else:
      print("NO")

if __name__ == "__main__":
    check7()

Submission status: Runtime Error

Solution code:
#入力した整数が５、７、５であるならばTrueを返す
# int,int,int -> True 

def check7(x,y,z):
    if x == 7:
        if y == z :
            print("YES")
        else:
            print("NO")
    elif y == 7:
        if x == z :
            print("YES")
        else:
          print("NO")
    elif z == 7:
        if x == y:
          print("YES")
        else:
          print("NO")
    else:
      print("NO")

if __name__ == __main__:
    check7()

Submission status: Runtime Error

Solution code:
# coding: utf-8
num,num2,num3 = map(int,inpput().split())
if (num == 5 and num2 == 5 and num3 == 7) or (num == 5 and num2 == 7 and num3 == 5) or (num == 7 and num2 == 5 and num3 == 5):
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
A =int(input())
B = int(input())
C = int(input())
 
count5 = 0
count7 = 0
 
if A == 5:
    count5 = count5 + 1
if A == 7:
    count7 = count7 + 1
if B == 5:
    count5 = count5 + 1
if B == 7:
    count7 = count7 + 1
if C == 5:
    count5 = count5 + 1
if C == 7:
    count7 = count7 + 1
    
if count5 == 2 and count7 == 1:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
A = input()
B = input()
C = input()
 
count5 = 0
count7 = 0
 
if A == 5:
    count5 = count5 + 1
if A == 7:
    count7 = count7 + 1
if B == 5:
    count5 = count5 + 1
if B == 7:
    count7 = count7 + 1
if C == 5:
    count5 = count5 + 1
if C == 7:
    count7 = count7 + 1
    
if count5 == 2 and count7 == 1:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
A =int( input())
B = int(input())
C = int(input())
 
count5 = 0
count7 = 0
 
if A == 5:
    count5 = count5 + 1
elif A == 7:
    count7 = count7 + 1
if B == 5:
    count5 = count5 + 1
elif B == 7:
    count7 = count7 + 1
if C == 5:
    count5 = count5 + 1
elif C == 7:
    count7 = count7 + 1
    
if count5 == 2 and count7 == 1:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

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

count5 = 0
count7 = 0

if A == 5:
    count5 = count5 + 1
elif A == 7:
    count7 = count7 + 1

if B == 5:
    count5 = count5 + 1
elif B == 7:
    count7 = count7 + 1
if C == 5:
    count5 = count5 + 1
elif C == 7:
    count7 = count7 + 1
    
if count5 == 2 and count7 == 1:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

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

count5 = 0
count7 = 0

if A == "5":
    count5 = count5 + 1
elif A == "7":
    count7 = count7 + 1

if B == "5":
    count5 = count5 + 1
elif B == "7":
    count7 = count7 + 1
if C == "5":
    count5 = count5 + 1
elif C == "7":
    count7 = count7 + 1
    
if count5 == 2 and count7 == 1:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
if int(input()) == 5 and int(input()) == 5 and int(input()) == 7:
    print('YES')
elif int(input()) == 5 and int(input()) == 7 and int(input()) == 5:
    print('YES')
elif int(input()) == 7 and int(input()) == 5 and int(input()) == 5:
    print('YES')
else: print('NO')

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    a = LI()
    a.sort()
    if a = [5, 5, 7]:
        print("YES")
    else:

        print("NO")
    return

#B
def B():
    return

#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    A()

Submission status: Runtime Error

Solution code:
from math import *

H, W, A, B = list(map(int, input().split()))
p = 1000000007

ft = [1]
ift = [-1] * (H + W + 1)
for i in range(1, H + W + 1):
    ft.append(ft[i-1] * i % p)

def ifac(a):
    if ift[a] != -1: return ift[a]
    res = 1
    x = ft[a]
    for i in range(ceil(log2(p-2))):
        if ((p - 2) >> i) & 1:
            res *= x % p
        x *= x % p
    ift[a] = res
    return res

def com(a, b):
    return (ft[a] * ifac(b) * ifac(a-b)) % p

ans = 0
for i in range(H-A):
    ans += com(B+i-1, i) * com(W-B+H-i-2, H-i-1)
    ans %= p

print(ans)

Submission status: Runtime Error

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

a = [int(i) i for input().split()]
count_5 = 0
count_7 = 0

for i in a:
  if i == 5:
    count_5 += 1
  elif i == 7:
    count_7 += 1
  else:
    continue

if count_5 == 2 and count_7 == 1:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i in a:
  if i==5:
    i5+=1
  if i==7:
    i7+=1

if i5==2 and i7==1:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

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

for i in a:
  if i==5:
    i5+=1
  elif i==7:
    i7+=1

if i5==2 & i7==1:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
L = list(map(int(),input().split()))
if sum(L)==17:
  print('YES')
else:
  pritn('NO')

Submission status: Runtime Error

Solution code:
lst = input('3 nums with 2 space(1<=nums<=10):')
i = 0
for n in lst:
  if n>10 or n<1:
    print('NO')
    break
    
  if n==5:
    i += 1
  elif n==7:
    i -= 1
if i == 1:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

Solution code:
A,B,C=map(int,input().split())
a=len(A)
b=len(B)
c=len(C)

if (a or b or c == 5) and (a or b or c ==7) and (a*b*c ==5*7*5):
  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 
	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 == 7,5,5 or a,b,c == 5,7,5:
	print("YES")
else:
	print("NO")

Submission status: Runtime Error

Solution code:
int a = 5
int b = 7
int c = 5
if a = b:
  print("YES")
elif b = c:
  print("YES")
elif c = b:
  ("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
def X(A,B,C):
  if A == 5 or A == 7:
    if B == 5 or B == 7:
      if C == 5 or C == 7:
          if A + B + C == 19:
              return "YES"
  return "NO"
A,B,C = int(input())
print(X(A,B,C))

Submission status: Runtime Error

Solution code:
N   =   int(input())
L   =   int(input())
a   =   []
for i in range(N):
    a.append(input())
for ele in sorted(a): 
    print(ele, end = '')

Submission status: Runtime Error

Solution code:
i = list(map(int, input().split()))
countFive = i.count(5)
countSeven = i.count(7)

if countFive == 2 & countSeven == 1
	print("YES")
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:
def equal(n, available):
  return n in available 

def less(n, available):
  return n < sorted(available)[0]

def greater(n, available):
  return n > sorted(available, reverse=True)[0]
  

#less(n, available) == True であること
def upper_next(n, available):  
  for v in sorted(available):
    if n < v:
      return v
  return 1/0

  
n_str, _ = [v for v in input().split()]
n_s = [0]
n_s.extend([int(n_str[i:i+1]) for i in range(len(n_str))])

d_s = [int(v) for v in input().split()]

available = set(list(range(10))) - set(d_s)

#print("n", n_s, "d", d_s, "u", available)

min_available = sorted(available)[0]
max_available = sorted(available, reverse=True)[0]

ans = [0]
ans.extend([min_available] * (len(n_s) - 1))

eq = True
for i in range(1, len(n_s)):
  if eq:
    if equal(n_s[i], available):
      ans[i] = n_s[i]
      continue
    else:
      eq = False
      if less(n_s[i], available):
        ans[i] = upper_next(n_s[i], available)
        #残りは最小値詰め
        break
      else:
        for j in range(i - 1, -1, -1):
          if ans[j] == max_available:
            ans[j] = min_available
          else:
            ans[j] = upper_next(ans[j], available)
            break
        break

begin = 0
if ans[0] == 0:
  begin = 1
ans_val = "".join(map(lambda x:str(x), ans[begin:]))

print(ans_val)

Submission status: Runtime Error

Solution code:
#include <iostream>
using namespace std;

int main(){
    int A[3];
    cin >> A[0] >> A[1] >> A[2];
    sort(A, A + 3);
    if((A[0] == 5) && (A[1] == 5) && (A[2] == 7)) {
        cout << "YES" << endl;
    }
    else {
        cout << "NO" <<endl;
    }

    return 0;
}

Submission status: Runtime Error

Solution code:
x=input()
y=input()
z=input()
if (x*y*z=5*5*7):
    print('true')
else:
    print('False')

Submission status: Runtime Error

Solution code:
X = int(input())

if X ==:[5,5,7],[5,7,5],[7,5,5]:
   print("yes")
   eles("no")

Submission status: Runtime Error

Solution code:
n, l = map(int, input().split())
a = []
for x in range(n):
    a.append(input())
a.sort()
print("".join(a))

Submission status: Runtime Error

Solution code:
n, l = map(int,input().split())
a = []
for x in range(n):
    a.append(input())
a.sort()
print("".join(a))

Submission status: Runtime Error

Solution code:
n, l = map(int,input().split())
a = []
for x in range(n):
    a.append(input())
a.sort()
print(""join(a))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A = list(map(int, input().split()))
if max(A)=7 and mean(A)=5 and min(A)=5:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,c=input().split()
if max(a,b,c)=7 and mean(a,b,c)=5 and min(a,b,c)=5:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
[A,B,C]=[int(input()),int(input()),int(input())]
list=[A,B,C]
if 5 in list:
    list.remove(5)
if 5 in list:
    list.remove(5)
if 7 in list:
    list.remove(7)
if len(list)==0:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

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

List=[]
for i in range(a):
    List.append(input())

print("".join(sorted(List)))

Submission status: Runtime Error

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

List=[]
for i in range(a):
    List.append(input())

print("".join(sorted(List)))

Submission status: Runtime Error

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

List=[]
for i in range(a):
    List.append(input)

print("".join(sorted(List)))

Submission status: Runtime Error

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

List=[]
for i in range(a):
    List.append(input)

    print("".join(sorted(List)))

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 and A==7;
    print("YES")
else;
    print("NO")

Submission status: Runtime Error

Solution code:


if

Submission status: Runtime Error

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

over = 0
for x in range(N,10000):
    for y in str(x):
        mediation = False
        for z in D:
            if int(y) == z:
                mediation = True
                break
        if mediation:
            break
        over = x
    if over!=0:
        break
print(over)

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
List=[input() for i in range(a)]

print("".join(sorted(List)))

Submission status: Runtime Error

Solution code:
a,b,c=input().split()
l=[]
l.append(len(a))
l.append(len(b))
l.append(len(c))
if l==[5,5,7] or l=[5,7,5] or l=[7,5,5]:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
def hantei(A,B,C):
  if A+B+C = 17:
    print('YES")
  
  else:
    print('NO')

Submission status: Runtime Error

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

a = input()
b = input()
c = input()
ar = [a,b,c]
ar.sort()
result = ''.join(ar)

print(result)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import itertools

white_num_list = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
 
N, K = map(int, input().split())
black_num_list = list(map(int, input().split()))
 
white_num_list = list(set(white_num_list).difference(set(black_num_list)))
num_combination = list(itertools.combinations_with_replacement(white_num_list, len(str(N))))
 
num_list = []
for num in num_combination:
    if num[0] == 0:
        continue
    num_list.append(int(''.join(map(str, num))))
 
num_list = sorted(num_list)
 
def price(N, num_list, white_num_list):
    for num in num_list:
        if num >= N:
            return num
    
    if 0 in white_num_list:
        white_num_list.remove(0)
    placeholder = str(min(white_num_list))
    return int(placeholder * (len(str(N)) + 1))
  
print(price(N, num_list, white_num_list))

Submission status: Runtime Error

Solution code:
if A+B+C==17 :
    if A==5 and B==5 :
        print("YES")
    elif A==5 and B==7 :
        print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
if A+B+C==17 :
    if (A==5 and B==5) :
        print("YES")
    elif (A==5 and B==7) :
        print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
if A+B+C==17 :
    if (A==5 and B==5)or(A==5 and B==7) :
        print("YES")

elif:
    print("NO")

Submission status: Runtime Error

Solution code:
if A+B+C==17 :
    if (A==5&&B==5)||(A==5&&B==7) :
        print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
if A+B+C==17 :
    if (A==5&&B==5)||(A==5&&B==7) :
        print("YES")
        
elif:
    print("NO")

Submission status: Runtime Error

Solution code:
if A+B+C==17 :
    if (A==5&&B==5)||(A==5&&B==7) :
        print("YES")
elif:
    print("NO")

Submission status: Runtime Error

Solution code:
A = input()
B = input()
C = input()
if A+B+C==17 :
    if (A==5&&B==5)||(A==5&&B==7) :
        print("YES")
elif:
    print("NO")

Submission status: Runtime Error

Solution code:
items = input().split()
items= map(int, items)
items.sort()
if items == [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 && a*b*c==175:
   print("YES")
else:
   print("NO")

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

int main()
{
  vector<int> V(3);
  scanf("%d %d %d", &V[0], &V[1], &V[2]);
  int five = 0;
  int seven = 0;

  for (int v : V)
  {
    if (v == 5)
    {
      five++;
    }
    else if (v == 7)
    {
      seven++;
    }
  }

  if (five == 2 && seven == 1)
  {
    printf("YES");
  }
  else
  {
    printf("NO");
  }
}

Submission status: Runtime Error

Solution code:
#include <stdio.h>
int main(void){
    // Your code here!
    int a,b,c;
    int i,cnt=0;
    scanf("%d%d%d",&a,&b,&c);
    if(a==5) cnt+=1;
    if(b==5) cnt+=1;
    if(c==5) cnt+=1;
    if(a+b+c==17 && cnt==2)
        printf("YES\n");
    else
        printf("NO\n");
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
    a,b,c=map(int, [input() for i in range(3)]
    if input().count("5")==2,input().count("7")==1:
              print("YES")
    else:
              print("NO")

Submission status: Runtime Error

Solution code:
a,b,c=map(int, [input() for i in range(3)]
if input().count("5")==2,input().count("7")==1:
          print("YES")
else
          print("NO")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,_ = map(str,input().split())
lists = [0,1,2,3,4,5,6,7,8,9]
s=list(map(int,input().split()))
price=""
flg=False

for i in s:
    lists.remove(i)

for i in N:
    for j,n in enumerate(lists):
        if int(i) <= int(j):
            price+=str(j)
            break
        if len(lists)==n:
            price+=str(lists[0])
            flg=True
#先頭0の場合
if lists[0]==0: lists.remove(0)
#繰り上がりの場合
if flg: price=str(lists[0])+price

print(price)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N, _ = map(int, input().strip().split())
D = input().strip().split()
for ans in range(N, 100000):
    if len(set(str(ans)) & set(D)) == 0:
        print(ans)
        break

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
D = input().split()
ans = N
for i in range(N, 10000):
    for x in str(ans):
        if x in D:
            ans += 1
            break;
    if ans == i:
        print(ans)
        break

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
D = input().split()
ans = N
for i in range(N, 10000):
    for x in str(ans):
        if x in D:
            ans += 1
            break;
    else:
        print(ans)
        exit()

Submission status: Runtime Error

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

sums=0
for i in num:
	sums+=i
  
if sums ==17:
	print("YES")
else:
	print("NO")

Submission status: Runtime Error

Solution code:
num = list(map(input()))

sums=0
for i in num:
	sums+=i
  
if sums ==17:
	print("YES")
else:
	print("NO")

Submission status: Runtime Error

Solution code:
n,k = map(int,input().split())
d = input().split()
while len(set(str(n)) & set(d)) !=0:
    n +=1
print(n)

Submission status: Runtime Error

Solution code:
s=sorted(input())
print(YES if s == '557' else NO)

Submission status: Runtime Error

Solution code:
sen=[A,B,C]
x=max(sen)
y=min(sen)
if x==7 and y==5 and sum(sen)-x-y==5:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
sen = [A,B,C]
sen.sort()
if sen == [5,5,7]:
	print("YES")
else:
	print("NO")

Submission status: Runtime Error

Solution code:
sen = [A,B,C]
print(sen)
sen.sort()
print(sen)
if sen == [5,5,7]:
	print("YES")
else:
	print("NO")