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:
import sys

input = sys.stdin.readline
N,K=map(int,input().rstrip().split())
D=list(map(int,input().rstrip().split()))

def dfs(N):
    for i in range(K):
        if(str(N).find(str(D[i]))!=-1):
            dfs(N+1)
            return
    else:
        print(N)
    
    


def resolve():
    dfs(N)


from io import StringIO
import unittest

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """1000 8
1 3 4 5 6 7 8 9"""
        output = """2000"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """9999 1
0"""
        output = """9999"""
        self.assertIO(input, output)

if __name__ == "__main__":
    #unittest.main()
    resolve()

Submission status: Runtime Error

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

mod = 10**9 + 7
n = 10**5 * 2 + 1

fact = [1]*(n+1)
rfact = [1]*(n+1)
r = 1
for i in range(1, n+1):
  fact[i] = r = r * i % mod
rfact[n] = r = pow(fact[n], mod-2, mod)
for i in range(n, 0, -1):
  rfact[i-1] = r = r * i % mod

# nPk (mod MOD) を求める
def perm(n, k):
  return fact[n] * rfact[n-k] % mod

# nCk (mod MOD) を求める
def comb(n, k):
  return fact[n] * rfact[k] * rfact[n-k] % mod 
ans = 0
for i in range(b,w):
  ans = (ans + comb(h-a-1+i,i) * comb(w-i+a-2,a-1)) % mod
print(ans)

Submission status: Runtime Error

Solution code:
x = list(map(str,input().split()))
if '2' == x.value_counts('5') and '1' == x.value_counts('7'):
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

Solution code:
a = input().split()
p

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = map(int, input().split())
return (s[0] == s[1] == 5 and s[2] == 7 or s[2] == s[1] == 5 and s[0] == 7 or s[0] == s[2] == 5 and s[1] == 7)

Submission status: Runtime Error

Solution code:
s = map(int, input().split())
return (s[0] == s[1] == 5 and s[2] == 7 or s[2] == s[1] == 5 and s[0] == 7 s[0] == s[2] == 5 and s[1] == 7)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if sorted(h) == sorted(b):
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
h, w, a, b = map(int, input().split(' '))

MOD = 10**9 + 7


def ncr(n, r):
    f = math.factorial
    return f(n) / f(r) / f(n-r)


r = 0
for i in range(b, w):
    y1 = h - a - 1
    x1 = i
    y2 = a - 1
    x2 = w - i - 1
    p = (ncr(x1 + y1, x1) * ncr(x2 + y2, x2)) % MOD
    r = (r + p) % MOD

print(int(r))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

payment = n
while True:
    tmp = str(payment)
    for t in tmp:
        if t in dislikes:
            break
    else:
        break
    payment += 1
print(payment)

Submission status: Runtime Error

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

in.sort()

if in=[5,5,7] : 
  print( 'Yes' )
else : 
  print( 'No' )

Submission status: Runtime Error

Solution code:
number1 = input("First number: ") 
number2 = input("\nSecond number: ") 
number3 = input("\nSecond number: ") 
  
if ( (number1==5&number1==7&number1==5) |
     (number1==7&number1==5&number1==5) |
     (number1==5&number1==5&number1==7) ) : 
    print("Yes") 
else: 
    print("No" )

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=[int(i) for i in input().split()]
a.sort()
if a=[5, 5, 7]:
 print("YES")
else print("NO");

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def abc ( ) : \n      l = '' . join ( input ( ) . split ( ) ) \n print ( 'YES' if l . replace ( '5' , '' ) == '7' else 'NO' ) \n \n \n abc ( )

Submission status: Runtime Error

Solution code:
N = list(map(int,input().split()))
five = 0
seven = 0
for i in N:
  if i == 5:
    five += 1
  elif i == 7:
    seven += 1
if five == 2 and seven == 1:
  print("YES")
else:
  print("NO)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
if A==5 and B==5 and C==7
  or A==5 and B==7 and C==5
  or A==7 and B==5 and C==5;
  print("YES");
else;
  print("NO");
end

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
a, b, c = map(int, input().split())
# 575判定式
if(a*b*c == 5*7*5 && a+b+c == 17):
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

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

if len(a) == 5 and len(b) == 5:
    if len(c) == 7:
        print('yes')
    else:
        print('no')
else:
    print('no')

Submission status: Runtime Error

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

l = [5, 5, 7]
if A in l:
    l.remove(A)
    if B in l:
        if C in l:
            print('YES')
            break
    print('NO')

Submission status: Runtime Error

Solution code:
ABC = [int(i) fo i  in input())
ABC.sort()
if sum(ABC) == 17 and ABC[0] == 5 and ABC[2] == 7:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

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

a, b, c = len(A), len(B), len(C)
 
if a == 5 or a == 7:
  if b == 5:
    if c == 5:
      print('NO')
    else:
      print('YES')
  else:
    if c == 5:
      print('YES')
    else:
      print('NO')

Submission status: Runtime Error

Solution code:
A,B,C = map(int, input().split())
if A==7 and B==5 and C==5:
  print("Yes")
else if A==5 and B==5 and C==7:
  print("Yes")
else if A==5 and B==7 and C==5:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
##### 解けた #####

A,B,C=list(map(int,input().split(" ")))

if (len(A)==5 and len(B)==7 and len(C)==5) or (len(A)==7 and len(B)==5 and len(C)==5) or (len(A)==5 and len(B)==5 and len(C)==7):
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
l =list(map(int,input().split()))
if l[0]+l[1]+[2]==17 and l[0]*l[1]*l[2]== 175:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
a,b,c =int(x) for in input().split()
if a+b+c==17 and a*b*c==175:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
import sys, math, itertools, heapq, collections, bisect, fractions
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**8)
inf = float('inf')
ans = count = 0

n,k=map(int,input().split())
D=set(input().split())
while True:
    ns=str(n)
    for ni in ns:
        if ni in D:
            break
    else:
        print(n)
        exit()
    n+=1
    continue

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 = list(map(int, input().split()))
if A == [5,7,5]
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = list(map(int, input().split()))
s = [input() for i in range(a[0])]
newa= sorted(s)
moji =''
for x in newa:
    moji += x
print(moji)

Submission status: Runtime Error

Solution code:
a = list(map(int, input().split()))
s = [input() for i in range(a[0])]
newa= sorted(s)
print(a[0],a[1])
[print(i) for i in newa]

Submission status: Runtime Error

Solution code:
NL=input().split()
N=int(NL[0])
L=int(NL[1])

S=[]
rank=[]
for i in range(N):
    S.append(input())
    rank.append(0)
temp=[]
for i in range(N):
    for j in range(N):
        if(S[i]<S[j]):
           temp.append(int(1))
        else:
            temp.append(int(0))        

for i in range(N*N):
    a=i%N
    rank[a]+=temp[i]
j=0
moji=""
for i in range(N):
    for j in range(N):
        if(i==rank[j]):
            moji=moji+S[j]
print(moji)

Submission status: Runtime Error

Solution code:
NL=input().split()
N=int(NL[0])
L=int(NL[1])

S=[]
rank=[]
for i in range(N):
    S.append(input())
    rank.append(0)
temp=[]
for i in range(N):
    for j in range(N):
        if(S[i]<S[j]):
           temp.append(int(1))
        else:
            temp.append(int(0))        

for i in range(N*N):
    a=i%N
    rank[a]+=temp[i]
j=0
moji=""
for i in range(N):
    for j in range(N):
        if(i==rank[j]):
            moji=moji+S[j]
print(moji)

Submission status: Runtime Error

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

if A == 5 or A == 7:
  if B == 5 or B == 7:
    if C == 5 or C == 7:
      if A + B + C == 17:
        print('Yes')
      else:
        print('No')
    else:
      print('No')
  else:
  	print('No')
else:
  print('No')

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:
A, B, C = int(input()), int(input()), int(input())

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 = ( int( input() ) for i in range(3) )

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=(int(x) for x in input().split())

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

Submission status: Runtime Error

Solution code:
n = list(map(int, input().split()))
N = n[0]
K = n[1]

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

num = [i for i in range(1,10)]
for i in d:
  if i == 0:
    continue
  else:
    num.remove(i)

total = N*min(num)
if total > N:
  print(N)
else:
  print(total)

Submission status: Runtime Error

Solution code:
N,K = [int(i) for i in input().split()]
#D = [int(i) for i in input().split()]は数値代入
#文字列を複数代入
D = input().split()
#集合に置き換える(型はset)
D = set(D)
use = set(['0','1','2','3','4','5','6','7','8','9'])
use -= D

for i in range(N,10001):
    if use >= set(str(i)):
        print(i)
        break

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
  S=input()  
  a, b, c = (int(i) for i in S.split())  
    d=(a+b+c)/17
    e=(max(a,b)-2+max(a,c)+max(b,c))/17
     
    if(d==1 and e==1): print("YES")
    else: print("NO")

Submission status: Runtime Error

Solution code:
    a, b, c = (int(i) for i in input().split())  
    d=(a+b+c)/17
    e=(max(a,b)-2+max(a,c)+max(b,c))/17
     
    if(d==1 and e==1): print("YES")
    else: print("NO")

Submission status: Runtime Error

Solution code:
    a, b, c = (int(i) for i in input().split())  
    d=(a+b+c)/17
    e=(max(a,b)-2+max(a,c)+max(b,c))/17
     
    if(d==1 and e==1): print("YES")
    else: print("NO")

Submission status: Runtime Error

Solution code:
a, b, c = (int(i) for i in input().split())  
d=(a+b+c)/17
e=(max(a,b)-2+max(a,c)+max(b,c))/21

if(d==1 and e==1)
print(min(a,b,c), max(a,b,c), min(a,b,c))

Submission status: Runtime Error

Solution code:
a=list(map(int,input.split()))
if a.sort==[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)]
print(''.join(S.sort()))

Submission status: Runtime Error

Solution code:
A,B,C = [int(i) for i in input().split()]
list = [A,B,C]

for i in list:
  if i == 5:
    go += 1
  if i == 7:
    nana += 1

if go == 2 and nana == 1:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
#Iroha Loves Strings (ABC Edition)
N, L = map(int, input().split())
S = []
for _ in range(N):
    S.append(input())
sort = sorted(S)
R = ""
for i in range(0,N):
    R = R + sort[i]
print(R)

Submission status: Runtime Error

Solution code:
#Iroha Loves Strings (ABC Edition)
N, L = map(int, input().split())
S = []
for _ in range(N):
    S.append(input())
R = []
K = ""
R.append(S[0])
for i in range(1, N):
    for j in range (0, i):
        if S[i] < R[j]:
            R.insert(j,S[i])
        if S[i] >= R[i-1]:
            R.append(S[i])
for i in range(0,N):
    K = K + R[i]
print(K)

Submission status: Runtime Error

Solution code:
x,y,z = map(int,input().split())

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

Submission status: Runtime Error

Solution code:
x,y,z = map(int,input().split())

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

Submission status: Runtime Error

Solution code:
ns,k = input().split()
nlist = input().split()
nslist = list(ns)
while set(nslist) & set(nlist):
    ns = int(ns)+1
    ns = str(ns)
    nslist = list(ns)
print(ns)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
line=input().split()
N=int(line[0])
K=int(line[1])
D=input().rstrip().split()

for i in range(N,10*N+1):
	s=str(i)
	flag=True
	for x in D:
		if x in s:
			flag=False
			break

	if flag:
		print(s)
    	break
	else:
		continue

Submission status: Runtime Error

Solution code:
ef main():
    HAIKU = [5, 7, 5]
    v = list(map(int, input().split()))
    return equal_list(v, HAIKU)


def equal_list(lst1, lst2):
    lst = lst1.copy()
    for element in lst2:
        try:
            lst.remove(element)
        except ValueError:
            break
    else:
        if not lst:
            return "YES"
    return "NO"


if __name__ == "__main__":
    print(main())

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
# まず長さが7の文節があるか確認
if (a == 7 and b ==5 and c == 5)or(a == 5 and b == 7 and c == 5)
or(a==5 and b==5 and c==7):
	print("YES")
  
else:
	print("NO")

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
# まず長さが7の文節があるか確認
if (a == 7  b == 5 c == 5)or(a == 5 b == 7 c == 5)or(a==5 b==5 c==7):
	print("YES")

else:
	print("NO")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)

int main() {
    vector<int> a(3);

    rep(i,3){
        cin >> a[i];
    }

    sort(a.begin(),a.end());

    if (a[0]!=5){
        cout << "NO" << endl;
        exit(0);
    }
    if (a[1]!=5){
        cout << "NO" << endl;
        exit(0);
    }
    if (a[2]!=7){
        cout << "NO" << endl;
        exit(0);
    }

    cout << "YES";
    return 0;
}

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
d = set(map(str, input().split()))
for i in range(n, 10*n):
    if len(d & set(str(i))) == 0:
        print(i)
        break

Submission status: Runtime Error

Solution code:
ls=list(map(int,input().split()))
ls1=[[5,7,5],[5,5,7],[7,5,5]]
if ls in ls1:
  print('YES')
  else:
    print('NO')

Submission status: Runtime Error

Solution code:
ls=list(map(int,input().split()))
A=ls[0]
B=ls[1]
C=ls[2]
if (A==B==5 and C=7) or (A==C==5 and B==5) or (A==7 or B==C==5):
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

Solution code:
arr_len_int = int(input().split(' ')[1])
a = [input() for i in range(arr_len_int)]
a.sort()
b = set(a)
print(''.join(b ))

Submission status: Runtime Error

Solution code:
val, size = map(int, input().split())
disabledList = [int(x) for x in input().split()] # number
enableList = list(set(range(10)) - set(disabledList)) # number
resultList = [] # str, must reverse
isTenOver = False
for char in reversed(list(str(val))):
  targetInt = int(char)
  if isTenOver:
    targetInt += 1
  if targetInt in enableList:
    isTenOver = False
    resultList.append(str(targetInt))
    continue
  resultList = [str(min(enableList))] * len(resultList)
  if targetInt > max(enableList):
    isTenOver = True
    resultList.append(str(min(enableList)))
  else:
    isTenOver = False
    minNum = min(filter(lambda x:x > targetInt, enableList))
    resultList.append(str(minNum))

if isTenOver:
  minNum = min(filter(lambda x:x > 0, enableList))
  resultList.append(str(minNum))
print(''.join(reversed(resultList)))

Submission status: Runtime Error

Solution code:
A,B,C=map(int(input()))
if A=5 or B=5 or C=7:
  print('Yes')
elif A=5 or B=7 or C=5:
  print('Yes')
elif A=7 or B=5 or C=5:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = list(map(int, input().split()))
count = 0
count1 = 0
for i in range(3):
  if a[i] == 5:
    count++
  elif a[i] == 7:
    count1++
    
if count == 2 & count1 == 1:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
if A==5 and B==5 and C==7:
  print('Yes')
elif A==5 and B==7 and C==5:
  print('Yes')
elif A==7 and B==5 and C==5:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
a = int(input().split())
if a[0] + a[1] + a[2] == 17:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
A, B, C = int(input().split())
if A == 7, B == 5, C == 5:
  print("YES")
elif A == 5, B == 7, C == 5:
  print("YES")
elif A == 5, B == 5, C == 7:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A = input()
B = input()
C = input()
D = A + B + C
if(D<=12):
  if (A == 7):
    if(B == 5):
      print('YES')
  if (B == 7):
    if(A == 5):
      print('YES')
  if (C == 7):
    if(A == 5):
      print('YES')
else:
  print('NO')

Submission status: Runtime Error

Solution code:

  a = list(map(int,input().split()))
  
a.sort()
  
ans = True
  
if a[0] != 5:
    ans = False
if a[1] != 5:
    ans = False
if a[2] != 7:
    ans = False

if(ans):
    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 == 17:
  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:
input_line=input().rstrip().split(" ")
five=int(input_line.count("5"))
seven=int(input_line.count("7"))
if five=2 and seven=1:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
input_line=input().rstrip().split(" ")
a=int(input_line[0])
b=int(input_line[1])
c=int(input_line[2])
if a+b+c!=17:
    print("NO")
elif (a==b==5 or a==c==5 or b==C==5) and a+b+c==17:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
input_line=input().rstrip().split(" ")
a=int(input_line[0])
b=int(input_line[1])
c=int(input_line[2])
if a==b==5 or a==c==5 or b==C==5:
    if a+b+c==17:
        print("YES")
elif a+b+c!=17:
    print("NO")

Submission status: Runtime Error

Solution code:
input_line=input().rstrip().split(" ")
a=int(input_line[0])
b=int(input_line[1])
c=int(input_line[2])
if a==b==5 or a==c==5 or b==C==5:
    if a+b+c==17:
        print("YES")
elif a+b+c!=17
    print("NO")

Submission status: Runtime Error

Solution code:
input_line=input().rstrip().split(" ")
a=int(input_line[0])
b=int(input_line[1])
c=int(input_line[2])
if a==b==5 or a==c==5 or b==C==5:
    if a+b+c==17:
        print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
input_line=input().rstrip().split(" ")
a=int(input_line[0])
b=int(input_line[1])
c=int(input_line[2])
if a==b==5 or a==c==5 or b==C==5:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
input_line=input().rstrip().split(" ")
a=int(input_line[0])
b=int(input_line[1])
c=int(input_line[2])
if a+b+c!=17:
    print("NO")
elif a==b==5 or a==c==5 or b==C==5:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
s = input().rstrip().split(' ')
counta = 0
countb = 0
for i in range(len(s)):
	if int(s[i]) == 7:
    	counta += 1
    elif int(s[i]) == 5:
		countb += 1
if counta == 1 and countb == 2:
	print('YES')
else:
	print('NO')

Submission status: Runtime Error

Solution code:
abc=[int(i) for i in input().split()]
num_five=0
num_seven=0
for i in range(3):
  if abc[i]==5:
    num_five+=1
  elif abc[i]==7:
    num_five+=1

if num_five==2 and num_seven==1:
  print("YES")
 else:
  print("NO")

Submission status: Runtime Error

Solution code:
def check_a(numbers):
    if numbers.count(5) == 2 and numbers.count(7) == 1:
        return 'YES'
    else:
        return 'NO'


def main():
    numbers = list(map(int, input()))
    print(check_a(numbers=numbers))


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
List=[int(i) for i in input().split()]
if List.count(5) == 2 and List.cout(7) == 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(*s,sep="")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
data = input()

flag1 = 0
flag2 = 0

for i in range(3):
  if data[i] = '5':
    flag1 += 1
  elif data[i] = '7':
    flag2 += 1

if flag1 == 1 and flag2 == 2:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

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

list = [a,b,c]

if(7 in list):
    if list.count(5)==2:
        print("YES")
    else:
        print("NO")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
input_a = input().split()
kazu = int(input_a[0]) + 1
suuji_kosuu = int(input_a[1])

input_b = input().split()

for i in range(kazu,10000):
    t = 0
    for j in range(suuji_kosuu):
        if input_b[j] in str(i):
            break
        else:
            t = t+1
            continue
    if t == suuji_kosuu:
        print(i)
        break

Submission status: Runtime Error

Solution code:
import numpy as np

n = list(map(int, input().split()))
d = np.array(list(map(int, input().split())))
a = len(str(n[0]))
x = np.zeros(a + 1)

for i in range(a + 1):
    x[i] = (n[0] % np.power(10, a - i + 1)) // np.power(10, a - i)

i = 1
while 1:
    while np.any(d == x[i]):
        x[i] += 1
        x[i + (i != a):] = 0
    if x[i] == 10:
        x[i - 1] += 1
        x[i:] = 0
        i = 0
    i += 1
    if np.any(d == x[0]) and x[0] != 0:
        i = 0
    if i == a:
        break
        
ans = 0
for i in range(a + 1):
    ans += x[i] * np.power(10, a - i)

print(int(ans))

Submission status: Runtime Error

Solution code:
import numpy as np
n = list(map(int, input().split()))
d = np.array(list(map(int, input().split())))

while 1:
    a = (n[0] % 10000) // 1000
    b = (n[0] % 1000) // 100
    c = (n[0] % 100) // 10
    e = n[0] % 10
    f = n[0] // 10000
    
    if f != 0 and np.any(d == f):
        n[0] = (f + 1) * 10000
    elif np.any(d == a):
        n[0] = f * 10000 + (a + 1) * 1000
    elif  np.any(d == b):
        n[0] = f * 10000 + a * 1000 + (b + 1) * 100
    elif np.any(d == c):
        n[0] = f * 10000 + a * 1000 + b * 100 + (c + 1) * 10
    elif np.any(d == e):
        n[0] += 1
    else:
        print(n[0])
        break

Submission status: Runtime Error

Solution code:
import numpy as np
n = list(map(int, input().split()))
d = np.array(list(map(int, input().split())))

while 1:
    a = (n[0] % 10000) // 1000
    b = (n[0] % 1000) // 100
    c = (n[0] % 100) // 10
    e = n[0] % 10
    f = n[0] // 10000
    
    if np.any(d == f):
        n[0] = f * 10000
    elif np.any(d == a):
        n[0] = f * 10000 + (a + 1) * 1000
    elif  np.any(d == b):
        n[0] = a * 1000 + (b + 1) * 100
    elif np.any(d == c):
        n[0] = a * 1000 + b * 100 + (c + 1) * 10
    elif np.any(d == e):
        n[0] += 1
    else:
        print(n[0])
        break

Submission status: Runtime Error

Solution code:
import numpy as np
n = list(map(int, input().split()))
d = np.array(list(map(int, input().split())))

while 1:
    if np.any(d == (n[0] // 1000)):
        n[0] += 1000 - (n[0] % 1000)
    elif np.any(d == (n[0] % 1000) // 100):
        n[0] += 100 - (n[0] % 100)
    elif np.any(d == (n[0] % 100) // 10):
        n[0] += 10 - (n[0] % 10)
    elif np.any(d == n[0] % 10):
        n[0] += 1
    else:
        print(n[0])
        break

Submission status: Runtime Error

Solution code:
input_line = input().split()
#print(input_line)
count5 = 0
count7 = 0
#print(input_line[0])
#print(len(input_line))
for i in range(len(input_line)):
#  print(input_line[i])
  if int(input_line[i]) == 5:
#    print(input_line[i])
    count5 += 1
#    print(count5)
  elif int(input_line[i]) == 7:
    count7 += 1
#    print(count7)
if count5 == 2 and count7 == 1:
  print("YES")
#  print(count5,count7)
else:
#  print(count5,count7)

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 = int(input())
b = int(input())
c = int(input())

if a == 5 and b == 7 and c == 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:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
S=map(int,input().split())

s=sorted(S)

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

Submission status: Runtime Error

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

for a in A:
    if a == 5:
        five_cnt++
    if a == 7:
        seven_cnt++

if five_cnt == 2 and seven_cnt == 1:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

if A+B+C is not 17:
    print('NO')
    exit(1)

print('YES')

Submission status: Runtime Error

Solution code:
# coding:utf-8
 
x, y, z = [int(i) for i in input().split()]
if x = 5 and y = 7 and z = 5:
  print("YES")
elif x = 7 and y = 5 and z = 5:
  print("YES")
elif x = 5 and y = 5 and z = 7:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
# coding:utf-8

x, y, z = list(map(int, input().split()))
if x = 5 and y = 7 and z = 5:
  print("YES")
elif x = 7 and y = 5 and z = 5:
  print("YES")
elif x = 5 and y = 5 and z = 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())
print(' '.join(sorted(s)))

Submission status: Runtime Error

Solution code:
#文字列大好きいろはちゃんイージー
n,l=list(map(int,input().split( )))
s=[]
for i in range(n):
    s.append(input())
print(' '.join(sorted(s)))

Submission status: Runtime Error

Solution code:
#文字列大好きいろはちゃんイージー
import numpy as np
n,l=list(map(int,input().split( )))
s=[]
for i in range(n):
    s.append(input())
print(''.join(sorted(s)))