Harryxun/stf_run huggingface dataset:
N, M = map(int, input().split())
al = []
for i in range(M):
  al.append(tuple(input().split()))
al_a = [i[0] for i in al if i[1] == 'AC']
al_a = list(set(al_a))
r1 = len(al_a)
r2 = 0
for j in al:
  if j[0] in al_a:
    if j[1] == 'AC':
    	al_a.remove(j[0])
  	else:
    	r2 += 1
    
print(r1 ,r2)

### FIXED CODE ###

def main():
    n, m = map(int, input().split())
    ac = [0] * n
    wanum = [0] * n
    for _ in range(m):
        p, s = input().split()
        p = int(p) - 1
        if ac[p]:
            continue
        else:
            if s == 'AC':
                ac[p] = 1
                wanum[p] *= -1
            else:
                wanum[p] -= 1
    wanum2 = [i for i in wanum if i > 0]
    print(sum(ac), sum(wanum2))

if __name__ == '__main__':
    main()
A,B,C = map(int, input().split())

A_B = (A+B)
A_C = (A+C)
B_C = (B+C)

if A_B == C or A_C == B or B_C = A:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

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

A_B = (a+b)
A_C = (a+c)
B_C = (b+c)

if (A_B == c):
    print("Yes")
elif (A_C == b):
    print("Yes")
elif (B_C == a ):
    print("Yes")
else:
    print("No")
n = int(input())
p=[int,input() for i in range(n)]
print(sum(p)-max(p)//2)

### FIXED CODE ###

n = int(input())
p=[int(input()) for i in range(n)]
print(sum(p)-max(p)//2)
n, m = map(int, inout().split())
if n * m == 1:
  print(1)
elif n == 1 or m == 1:
  print(n + m - 1)
else:
  print((n - 2) * (m - 2))

### FIXED CODE ###

n, m = map(int, input().split())
if n * m == 1:
  print(1)
elif n == 1 or m == 1:
  print(n + m - 3)
else:
  print((n - 2) * (m - 2))
h, w, k = map(int, input().split())
a = [0]*(w-1) + [1]
for i in range(w-1):
    a[i] = a[i-1] + a[i-2]
dp = [0]*(w+1)
tmp = [0]*(w+1)
dp[0] = 1
for _ in range(1, h+1):
    for i in range(w):
        tmp[i] = (dp[i]*a[i-1]*a[w-i-2]
            + dp[i+1]*a[i-1]*a[w-i-3]
            + dp[i-1]*a[i-2]*a[w-i-2]) % (10**9+7)
        tmp[i] %= m
    dp, tmp = tmp, dp
print(dp[k-1])

### FIXED CODE ###

m = 10**9+7
h, w, k = map(int, input().split())
a = [0]*(w-1) + [1]
for i in range(w-1):
    a[i] = a[i-1] + a[i-2]
dp = [0]*w
tmp = [0]*w
dp[0] = 1
for _ in range(1, h+1):
    for i in range(w):
        tmp[i] = dp[i]*a[i-1]*a[w-i-2]
        if i != w-1:
            tmp[i] += dp[i+1]*a[i-1]*a[w-i-3]
        if i != 0:
            tmp[i] += dp[i-1]*a[i-2]*a[w-i-2]
        tmp[i] %= m
    dp, tmp = tmp, dp
print(dp[k-1])
n = int(input())

if "9" in n:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

n = input()

if "9" in n:
  print("Yes")
else:
  print("No")
N=int(input())
H=list(map(int,input().split()))
val1,val2=H[-1],H[-2]
for i in range(N-1):
  if H[i]<H[i+1]:
    H[i]=0
  else:
    H[i]=1
if val1<=val2:
  H[-1]=1
else:
  H[-1]=0
zero=[]
for i in range(N):
  if H[i]==0:
    zero.append(i)
if len(zero)==N:
  print(0)
elif len(zero)==0:
  print(N)
elif len(zero)==1:
  print(max(zero[0],N-zero[0]-2))
else:
  ans=0
  for i in range(len(zero)-1):
    ans=max(ans,zero[i+1]-zero[i]-1)
  ans=max(ans,zero[-1]-zero[-2]-1)
  if H[-1]==1:
    ans=max(ans,N-zero[-1]-2)
  else:
    pass
  print(ans) 

### FIXED CODE ###

N=int(input())                                       
H=list(map(int,input().split()))
for i in range(N-1):
  if H[i]<H[i+1]:
    H[i]=0
  else:
    H[i]=1
H[-1]=0
zero=[]
for i in range(N):
  if H[i]==0:
    zero.append(i)
if len(zero)==N:
  print(0)
elif len(zero)==1:
  print(N-1)
else:
  ans=0
  for i in range(len(zero)-1):
    ans=max(ans,zero[i+1]-zero[i]-1)
  ans=max(ans,zero[-1]-zero[-2]-1) 
  print(ans)
from collections import defaultdict
from math import factorial

n = int(input())
s = []

for i in range(n):
    t = list(input())
    t.sort()
    s += [t]

for i in range(n):
    s[i] = ",".join(s[i])
    s[i] = s[i].replace(",","")
    
d = defaultdict(int)

for key in s:
    d[key] += 1
    
cnt = 0

for key, val in d.items():
    if val >= 2:
        cnt += factorial(val) / factorial(2) / factorial(val - 2)

print(int(cnt))

### FIXED CODE ###

from collections import defaultdict
from math import factorial

n = int(input())
s = []

for i in range(n):
    t = list(input())
    t.sort()
    s += [t]

for i in range(n):
    s[i] = ",".join(s[i])
    s[i] = s[i].replace(",","")
    
ans = 0

d = defaultdict(int)

for key in s:
    if key in d:
        ans += d[key]
    d[key] += 1
    
print(ans)
x=int(input())

if s==0:
  return 1
elif s==1:
  return 0

### FIXED CODE ###

x=int(input())

if x==0:
  print(1)
elif x==1:
  print(0)
while True:
    H,W=map(int,input().split())
    for i in range(H):
        print(W*"#")
    print("")


### FIXED CODE ###

while True:
    H,W=map(int,input().split())
    if H==0 and W==0:
        break
    for i in range(H):
            print(W*"#")
    print("")
s = input()
k = (int)(input())

c = 0
for ch in s:
  if not ch == '1':
    break
  c += 1
n = s[c] if c < len(s) else None
a = n if n and c < k else S[0]
print(a)


### FIXED CODE ###

s = input()
k = (int)(input())

c = 0
for ch in s:
  if not ch == '1':
    break
  c += 1
n = s[c] if c < len(s) else None
a = n if n and c < k else s[0]
print(a)
import sys
sys.setrecursionlimit(102030)
N=int(input())
a=[-1]+[int(input())-1 for i in range(1,N)]
G=[[] for i in range(N)]
for i in range(1,N):
    G[a[i]].append(i)
def dp(i):
    if len(G[i])==0:
        return 0
    X=sorted([dp(j) for j in G[i]],reverse=True)
    K=len(X)
    Y=[X[i]+i+1 for i in range(K)]
    return max(Y)
print(dp(0))


### FIXED CODE ###

import sys
import heapq
sys.setrecursionlimit(2*10**5)
N=int(input())
a=[-1]+[int(input())-1 for i in range(1,N)]
G=[[] for i in range(N)]
for i in range(1,N):
    G[a[i]].append(i)
def dp(i):
    if len(G[i])==0:
        return 0
    q=[]
    for j in G[i]:
        heapq.heappush(q,-dp(j))
    k=1
    res=0
    while(q):
        x=-heapq.heappop(q)
        res=max(res,x+k)
        k+=1
    return res
print(dp(0))
import sys

S, T = map(int, sys.stdin.readline.split())

print(S+T)

### FIXED CODE ###

import sys

S, T = map(str,input().split())

print(T+S)
n = int(input())
vote = dict()
for i in range(n):
  s = input()
  if s not in vote.keys():
    vote[s] = 0
  else:
    vote[s] += 1
vote.sort()
res = sorted(vote.values(), reverse = True)
for i in res.keys():
  print(i)

### FIXED CODE ###

n = int(input())
vote = dict()
for i in range(n):
  s = input()
  if s not in vote.keys():
    vote[s] = 0
  else:
    vote[s] += 1

res = []
mx = max(vote.values())
for key, value in vote.items():
    if value== mx:
        res.append(key)

res = sorted(res)
for i in res:
  print(i)
a,b = list(map(int,(input().split())))
temp_a = int(a/0.08)
temp_b = int(b/0.1)
ans = 0
#print(temp_a,temp_b)
for i in range(min(temp_a,temp_b)/2,max(temp_b,temp_a)+1):
  if  int(i* 0.08) == int(i * 0.1) or temp_a == temp_b:
    ans = i
    break
    
if ans:
  print(ans)
else:
  print(-1)

### FIXED CODE ###

a ,b = list(map(int,(input().split())))
ans = 0
for i in range(1,10000):
  if int(i * 0.08) == a and int(i * 0.1) == b:
    ans = i
    break
  else  :
    ans = -1
    
    
print(ans)
import math

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

sum = 0
for i in range(n):
  sum += math.log10(a[i])

if sum >= 18:
  print(-1)
else:
  sum = 1
  for i in range(n):
    sum *= a[i]
  print(sum)


### FIXED CODE ###

import math

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

flag_zero = 0
sum = 0
for i in range(n):
  if a[i]==0:
    flag_zero = 1
  else:
    sum += math.log10(a[i])

if flag_zero == 1:
  print(0)
elif sum > 18:
  print(-1)
else:
  sum = 1
  for i in range(n):
    sum *= a[i]
  if sum > 10**18:
    print(-1)
  else:
    print(sum)
a = int(input())
 c = a % 10
 
if c in ［ 3］:
  print("bon")
elif c in ［ 0,1,6,8］:
  print("pon")
else:
  print("hon")

### FIXED CODE ###

n = int(input())
c = n % 10
 
if c in [3]:
  print("bon")
elif c in [0,1,6,8]:
  print("pon")
else:
  print("hon")
N=int(input())
X=list(map(int, input().split()))

import copy
X_sort=copy.deepcopy(X)
X_sort.sort()
X_sort

median_control=(X_sort[N//2-1]+X_sort[N//2])/2
for i in range (N):
    if X[i]>median_control:
        print (X_sort[N//2-1])
    if X[i]<=median_control:
        print (X_sort[N//2])



### FIXED CODE ###

A, B, X = map(int, input().split())
if X>=A and X<= A+B:
    print ("YES")
else:
    print ("NO")
a = int(input())

for i in range(int(a**0.5),0,-1):
    if a % i == 0:
        print(int(a/i + i -2))
        break


### FIXED CODE ###

a = list(map(int, input().split()))
if 1<=a[0] and a[0]<=9:
    if 1<=a[1] and a[1]<=9:
        print(a[0]*a[1])
    else:
        print(-1)
else:
    print(-1)
#!/usr/bin/env python3
import sys
import math


def solve(N: int, A: "List[int]"):
    L = []
    last = A[0]
    for i in range(N):
        last = math.gcd(last, A[i])
        L.append(last)
    last = A[-1]
    R = []
    for i in range(1, N+1):
        last = math.gcd(last, A[-i])
        R.append(last)
    maxGCD = max(L[-2], R[-2])
    for i in range(0, N-1):
        maxGCD = max(math.gcd(L[i], R[i]), maxGCD)
    print(maxGCD)
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)


if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys
import fractions
import math


def solve(N: int, A: "List[int]"):
    L = []
    last = A[0]
    for i in range(N):
        last = fractions.gcd(last, A[i])
        L.append(last)
    last = A[-1]
    R = []
    for i in range(1, N+1):
        last = fractions.gcd(last, A[-i])
        R.append(last)
    R.reverse()
    if N == 2:
        print(max(A[0], A[1]))
        return
    maxGCD = max(L[-2], R[1])
    for i in range(1, N-1):
        maxGCD = max(fractions.gcd(L[i-1], R[i+1]), maxGCD)
    print(maxGCD)
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)


if __name__ == '__main__':
    main()
S=str(input())
a={"SUN":7,"MON":6,"TUE":5,"WED":4,"THU":3,"FRI":2,"SAT":1}
print(a(S))

### FIXED CODE ###

S=str(input())
A={"SUN":7,"MON":6,"TUE":5,"WED":4,"THU":3,"FRI":2,"SAT":1}
print(A[S])
a=map(int,raw_input().split())
a.sort()
b=0
for i in a:
 t=True
 for I in range(2,int(a**0.5)+1):
  if i%I==0: 
   t=False
   break
 if t:
  b+=1
print(b)

### FIXED CODE ###

a=input()
def ip(a):
    i=2
    while i**2<=a:
        if a%i==0:return False
        i+=1
    return True
b=0
for i in range(int(a)):
    c=input()
    if ip(int(c)):b+=1
print(str(b))
N=int(input())
test_case=[input() for_in range(N)]
a=test_case.count('AC')
b=test_case.count('WA')
c=test_case.count('TLE')
d=test_case.count('RE')
print('AC x '+ a)
print('WA x '+ b)
print('TLE x '+ c)
print('RE x '+ d)


### FIXED CODE ###

N=int(input())
test_case=[input() for _ in range(N)]
a=test_case.count('AC')
b=test_case.count('WA')
c=test_case.count('TLE')
d=test_case.count('RE')
print('AC x '+ str(a))
print('WA x '+ str(b))
print('TLE x '+str(c))
print('RE x '+str(d))
n, k , s = map(int, input().split())
ans = []
for i in range(n):
    if k != 0:
        ans.append(s)
        k -= 1
    else:
      	if s == 10**9:
          ans.append(s-1)
        else if s == 1:
          ans.append(s+1)
		else:
          ans.append(s+1)
print(" ".join([str(x) for x in ans]))


### FIXED CODE ###

n, k , s = map(int, input().split())
ans = []
for i in range(n):
    if k != 0:
        ans.append(s)
        k -= 1
    else:
        ans.append(s+1 if s != 10**9 else s-1)
print(" ".join([str(x) for x in ans]))
N = int(input())
AList = list(map(int, input().split()))

count = 0
roop = 0
while reduce(lambda x,y:x*y, AList) % 2 == 0:
	for i in range(N):
		AList[i] = AList[i] / 2
		if AList[i] % 2 == 0:
			break
		count += 1

roop = count // N
print(roop)

### FIXED CODE ###

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

flag = True
count = 0
while flag:
	for i in range(N):
		if Alist[i] % 2 != 0:
			flag = False
			break

	if flag:
		for i in range(N):
			Alist[i] = Alist[i] / 2
		count += 1

print(count)
import sys
n, m = map(int, input().split())
r = [-1] * n

for _ in range(m):
    s, c = map(int, input().split())
    if r[s-1] == -1 or r[s-1] == c:
        r[s-1] = c
    else:
        print(-1)
        sys.exit(0)

if r[0] == 0:
    print(-1)
    sys.exit(0)
if r[0] == -1 and n > 1:
    r[0] = 1

n_r = [0 if i == -1 else i for i in r]
result = ''.join([str(i) for i in n_r])
print(result)

### FIXED CODE ###

n = int(input())
print(n // 2 + n % 2)
S=int(input())
h=S//3600
m=(S-h*3600)//60
m=(S-h*3600)-m*60
print(h,':',m,':',s,  sep='')


### FIXED CODE ###

S=int(input())
h = S//(60**2)
m = (S-h*60**2)//60
s = S-(h*60**2+m*60)
print(f"{h}:{m}:{s}")
import sys
import math
import collections

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    K = int(input())
    S = input().strip()

    MOD = 10 ** 9 + 7

    fact = [1, 1]
    factinv = [1, 1]
    inv = [0, 1]

    def cmb(n, k, p):
        if (k < 0) or (n < k):
            return 0
        r = min(k, n - k)
        return fact[n] * factinv[k] * factinv[n - k] % p

    N = 10 ** 6
    for i in range(2, N + 1):
        fact.append((fact[-1] * i) % MOD)
        inv.append((-inv[MOD % i] * (MOD // i)) % MOD)
        factinv.append((factinv[-1] * inv[-1]) % MOD)

    ans = 0
    for i in range(K + 1):
        if len(S) == 1:
            ans += pow(25, i, MOD) * pow(26, K - i, MOD)
        else:
            ans += pow(25, i, MOD) * cmb(i + len(S) - 1, len(S) - 1, MOD) * pow(26, K - i, MOD)

    print(ans % MOD)


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
import math
import collections

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    K = int(input())
    S = input().strip()

    MOD = 10 ** 9 + 7

    fact = [1, 1]
    factinv = [1, 1]
    inv = [0, 1]

    def cmb(n, k, p):
        if (k < 0) or (n < k):
            return 0
        r = min(k, n - k)
        return fact[n] * factinv[k] * factinv[n - k] % p

    N = 10 ** 6 * 2
    for i in range(2, N + 1):
        fact.append((fact[-1] * i) % MOD)
        inv.append((-inv[MOD % i] * (MOD // i)) % MOD)
        factinv.append((factinv[-1] * inv[-1]) % MOD)

    ans = 0
    for i in range(K + 1):
        if len(S) == 1:
            ans += pow(25, i, MOD) * pow(26, K - i, MOD)
        else:
            ans += pow(25, i, MOD) * cmb(i + len(S) - 1, len(S) - 1, MOD) * pow(26, K - i, MOD)

    print(ans % MOD)


if __name__ == '__main__':
    main()
I=input
n=int
for i in range(n(input())):
  I();t=[];x=0
  for i,j in zip(map(n,I().split()[::-1]),I()[::-1]):
    [i^=k*(i^k<i)for k in t];j=n(j);t+=[i*(j^1)];x|=(i>0)&j
  print(x)

### FIXED CODE ###

#一次独立：rankが成分数
import numpy as np
#0-indexed,MSBがma以下の時
def msb(x,ma=59):
    for i in range(ma,-1,-1):
        if (x>>i)&1:
            return i
    return len()
t=int(input())
for _ in range(t):
    n=int(input())
    a=list(map(int,input().split()))
    s=input()
    #独立、msb同じものはない
    #逆に異なれば独立
    msbs=[0 for i in range(60)]
    for i in range(n-1,-1,-1):
        now=a[i]
        m=59
        #独立のときfはTrue、独立でない時fはFalse
        while True:
            m=msb(now,m)
            if msbs[m]==0:
                f=True
                break
            now=msbs[m]^now
            if now==0:
                f=False
                break
        if s[i]=="0":
            if f:
                msbs[m]=now
        else:
            if f:
                print(1)
                break
    else:
        print(0)
data = [
    [[0 for r in range(10)] for f in range(3)] for b in range(4)
]

count = int(input())
for c in range(count):
    c, f, r, v = [int(i) for i in input().split()]
    data[b - 1][f - 1][r - 1] += v
    

for bi, b in enumerate(data):
    for f in b:
        for r in f:
            print(' {0}'.format(r), end='')
    
        print()

### FIXED CODE ###

data = [
    [[0 for r in range(10)] for f in range(3)] for b in range(4)
]
    
count = int(input())
for c in range(count):
    b,f,r,v = [int(i) for i in input().split()]
    data[b-1] [f-1] [r-1] += v
    
for bi, b in enumerate(data):
    for f in b:
        for r in f:
            print(' {0}'.format(r), end='')
        print()
    if bi < 3:
        print('#' * 20)
def b(N, s):
    v = sum(s)
    for i in range(N, 0, -1):
        if v % 10 == 0:
            if s[i] % 10:
                v -= s[i]
            continue
        else:
            return a
    return 0
    
N = int(input())
s = []

for _ in range(N):
    s.append(int(input()))
    
s.sort(key=lambda x:-x)

print(b(N, s))

### FIXED CODE ###

def b(N, s):
    v = sum(s)
    for i in range(N, 0, -1):
        if v % 10 == 0:
            if s[i-1] % 10:
                v -= s[i-1]
            continue
        else:
            return v
    return 0
    
N = int(input())
s = []

for _ in range(N):
    s.append(int(input()))
    
s.sort(key=lambda x:-x)

print(b(N, s))
def judge(S,N):
    a = [x for x in list(S)]
    lst = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","A","B"]
    mak = []
    llst = lst
    for i in range(len(a)):
        for j in range(25):
            if a[i]==lst[j]:
                mak.append(lst[j+N])
    print("".join(mak))

N = int(input())
S = input()
judge(S,N)

### FIXED CODE ###

def judge(S,N):
    a = [x for x in list(S)]
    lst = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
    mak = []
    llst = lst + lst
    for i in range(len(a)):
        for j in range(26):
            if a[i]==llst[j]:
                mak.append(llst[j+N])
    print("".join(mak))

N = int(input())
S = input()
judge(S,N)
n, k = map(int, input().split())
x = list(map(int, input().split()))

for center in range(n):
    if x[center] >= 0:
        break

if center == n or (center == n - 1 and x[n - 1] == 0):
    print(-1 * x[n - k])
    exit()
elif center == 0:
    print(x[k - 1])
    exit()

plus = [0] + x[center:]
minus = [0] + list(reversed(list(map(lambda i:i * -1, x[:center]))))

ans = 10 ** 10

for i in range(max(k - len(minus) + 1, 0), min(k + 1, len(plus))):
    ans = min(ans, plus[i] + minus[k - i] + min(plus[i], minus[k - 1]))

print(ans)

### FIXED CODE ###

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

for center in range(n):
    if x[center] >= 0:
        break

if center == n - 1:
    print(-1 * x[n - k])
    exit()
elif center == 0:
    print(x[k - 1])
    exit()

plus = [0] + x[center:]
minus = [0] + list(reversed(list(map(lambda i:i * -1, x[:center]))))

ans = 10 ** 10

for i in range(max(k - len(minus) + 1, 0), min(k + 1, len(plus))):
    ans = min(ans, plus[i] + minus[k - i] + min(plus[i], minus[k - i]))

print(ans)
S=input()
n=len(S)-1
ans=0
f=S[0]
for bit in range(1<<(n-1)):
  for i in range(n-1):
    if bit & (1<<i):
      f+="+"
    f+=s[i+1]
  ans+=sum(map(int,f.split("+")))
print(ans)

      	
  

### FIXED CODE ###

S=input()
n=len(S)
ans=0

for bit in range(1<<(n-1)):
  f=S[0]
  for i in range(n-1):
    if bit & (1<<i):
      f+="+"
    f+=S[i+1]
  ans+=sum(map(int,f.split("+")))
print(ans)
n, m = map(int, input().split())
a = [input() for _ in range(n)]
b = [input() for _ in range(m)]

flag = False

for i in range(n):
    for j in range(n-m+1):
        cnt = 0
        for k in range(m):
            for l in range(m):
                if a[i+k][j+l] == b[k][l]:
                    cnt += 1
        if cnt == m**2:
            flag = True
            break
    if flag:
        break
print("Yes" if flag else "No")

### FIXED CODE ###

n, m = map(int, input().split())
a = [input() for _ in range(n)]
b = [input() for _ in range(m)]

flag = False

for i in range(n-m+1):
    for j in range(n-m+1):
        cnt = 0
        for k in range(m):
            for l in range(m):
                if a[i+k][j+l] == b[k][l]:
                    cnt += 1
        if cnt == m**2:
            flag = True
            break
    if flag:
        break
print("Yes" if flag else "No")
N =input()
if N.count("7") >= 1:
  pirnt("Yes)
else:
	print("No"9

### FIXED CODE ###

n = input()
if "7" in n:
  print("Yes")
else:
  print("No")
from sys import stdin
n = int(stdin.readline().rsprit())
s = stdin.readline().rstrip()

if n >= 3200:
    print(s)
else:
    print("red")

### FIXED CODE ###

from sys import stdin
n = int(stdin.readline().rstrip())
s = stdin.readline().rstrip()

if n >= 3200:
    print(s)
else:
    print("red")
N,K = map(int,input().split())
listn = list(str(N))
for i in range(K):
    if listn[i] != str(1):
        a.append(str(listn[i]))
if a == []:
    print(1)
else:
    print(a[0])

### FIXED CODE ###

N, K = [int(input()) for _ in range(2)]
listn = list(str(N))
a = []
if len(str(N)) < K:
    for i in range(len(str(N))):
        if listn[i] != str(1):
            a.append(str(listn[i]))
else:
    for i in range(K):
        if listn[i] != str(1):
            a.append(str(listn[i]))
if a == []:
    print(1)
else:
    print(a[0])
a, b = int(input())

if a <= 8 and b <= 8:
  print(Yay!)
else:
  print(:()

### FIXED CODE ###

a, b = map(int, input().split())
 
if a <= 8 and b <= 8:
  print('Yay!')
else:
  print(':(')
R,G=map(int,input().split())
print(G*2-R)

### FIXED CODE ###

r=int(input())
g=int(input())
print(2*g-r)
from decimal import Decimal
from floor import math 
X = int(input())
yen = 100
n = 1
while True:
    yen = decimal(math.floor(yen*1.01*n))
    if X <= yen:
        print(n)
        break
    n = n + 1

### FIXED CODE ###

import math 
X = int(input())
yen = 100
n = 0
while yen < X:
    n = n + 1
    yen = math.floor(yen*1.01)
    if X <= yen:
        print(n)
import sys
stdin = sys.stdin
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

s = ns()[::-1]
ans = "YES"

def func(spart):
    if spart[:5] == "maerd":
        if len(spart) == 5:
            return "YES"
        else:
            return func(spart[5:])
    elif spart[:7] == "remaerd":
        if len(spart) == 7:
            return "YES"
        else:
            return func(spart[7:])
    elif spart[:5] == "esare":
        if len(spart) == 5:
            return "YES"
        else:
            return func(spart[5:])
    elif spart[:6] == "resare":
        if len(spart) == 6:
            return "YES"
        else:
            return func(spart[6:])
    else:
        return "No"

print(func(s))

### FIXED CODE ###

import sys
stdin = sys.stdin
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

s = ns()[::-1]
ans = "YES"

while len(s) > 1:
    if s[:5] == "maerd":
        s = s[5:]
    elif s[:7] == "remaerd":
        s = s[7:]
    elif s[:5] == "esare":
        s = s[5:]
    elif s[:6] == "resare":
        s = s[6:]
    else:
        ans = "NO"
        s = ""

print(ans)
s,t = map(int,input().split())
a,b = map(int,input().split())
u = int(input())
if u==s:
  a=a-1
else:
  b=b-1
print(a,b)

### FIXED CODE ###

s,t = input().split()
a,b = map(int,input().split())
u = input()
if u==s:
  a=a-1
else:
  b=b-1
print(a,b)