Harryxun/stf_run huggingface dataset:
def resolve():
    N, A, B = list(map(int, input().split()))
    line = ''
    for i in range(10 ** 100):
        if len(line) > N:
            break
        if i % 2 == 0:
            line += 'b' * A
        else:
            line += 'r' * B

    print(line[:N].count('b'))

    return


resolve()

### FIXED CODE ###

def resolve():
    N, A, B = list(map(int, input().split()))
    ans = 0
    ans += N // (A + B) * A
    ans += min(N % (A+B), A)

    print(ans)

    return


resolve()
h,w=map(int,input().split())

s=[input() for i in range(h)]

def ok(i,j,houkou, count):
    if i==h or j==w:
        return count
    elif s[i][j]=='#':
        return count
    elif houkou=='yoko':
        return ok(i,j+1,houkou,count+1)
    else:
        return ok(i+1,j,houkou,count+1)

yoko=[[0 for i in range(w)] for j in range(h)]
tate=[[0 for i in range(w)] for j in range(h)]

# print(yoko)
for i in range(h):
    for j in range(w):
        if s[i][j]=='.' and yoko[i][j]==0:
            count=ok(i,j,'yoko',0)
            for k in range(count):
                yoko[i][j+k]=count


for i in range(h):
    for j in range(w):
        if s[i][j]=='.' and tate[i][j]==0:
            count=ok(i,j,'tate',0)
            for k in range(count):
                tate[i+k][j]=count


ans=0
for i in range(h):
    for j in range(w):
        if ans<yoko[i][j]+tate[i][j]-1:
            ans=yoko[i][j]+tate[i][j]-1
print(ans)

### FIXED CODE ###

h,w=map(int,input().split())

s=[input() for i in range(h)]

yoko=[[0 for i in range(w)] for j in range(h)]
tate=[[0 for i in range(w)] for j in range(h)]

count=0
for i in range(h):
    for j in range(w):
        if s[i][j]=='.':
            count+=1
        if s[i][j]=='#' or j+1==w:
            for k in range(count):
                yoko[i][j-k-1]=count
            count=0

# print(yoko)


for j in range(w):
    for i in range(h):
        if s[i][j]=='.':
            count+=1
        if s[i][j]=='#' or i+1==h:
            for k in range(count):
                tate[i-k-1][j]=count
            count=0

# print(tate)

ans=0
for i in range(h):
    for j in range(w):
        if ans<yoko[i][j]+tate[i][j]-1:
            ans=yoko[i][j]+tate[i][j]-1
print(ans)
N = input()
A = int(N[-3])*100 + int(N[-2])*10 + int(N[-1])
print(1000 - A)

### FIXED CODE ###

N = input()
if len(N) >= 3:
    A = int(N[-3])*100 + int(N[-2])*10 + int(N[-1])
    if A == 0:
        print(0)
    else:
        print(1000 - A)
elif len(N) == 2:
    A = int(N[-2])*10 + int(N[-1])
    print(1000 - A)
elif len(N) == 1:
    A = int(N[-1])
    print(1000 - A)
import math

def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))
    A = sorted(A, reverse=True)
    tA = []
    for a in A:
        tA.append((a, 1))

    for k in range(K):
        #print('rope:' + str(k))
        a, diva = tA[1]
        b, divb = tA[0]
        #print(tA)
        while b/divb > a/diva:
            divb += 1
        B = b/divb
        x = 1
        while x < N:
            xn, divx = tA[x]
            if xn/divx < B:
                break
            x += 1
        if x != N:
            tA.insert(x, (b, divb))
        else:
            tA.append((b, divb))
        tA = tA[1:]
        #print(tA)
    print(math.ceil(tA[0][0]/tA[0][1]))




if __name__ == '__main__':
    main()



### FIXED CODE ###

from math import ceil


def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))

    def check(Min):
        kill = 0
        for a in A:
            kill += (ceil(a/Min)-1)
        return kill <= K

    l = 0
    r = 1000000000

    while r-l > 1:
        mid = (l+r)//2
        if check(mid):
            r = mid
        else:
            l = mid
    print(r)
        


if __name__ == '__main__':
    main()
k=int(input())
lists=[49 for i in range(50)]
T=k//50
for j in range(50):
    lists[j]+=T
print(50)

sums=0
for i in range(50):
    sums+=math.floor((lists[i]+k)/(51))
dis=k-sums
lists[0]=lists[0]-51*dis
print(*lists)

### FIXED CODE ###

#Decrease (const)
K = int(input())
# 適当に構成する
N = 50
u, v = divmod(K, 50)
P = [u+i for i in range(N)]
for i in range(1, v+1):
    P[-i] += 1
print(N)
print(*P)
from math import ceil
n, a, b = map(int, input().split())
h = [int(input()) for i in range(n)]

def enough(t):
    count = 0
    for hp in h:
        count += ceil(max(0, hp - b*t) / (a-b))
    if(count <= t):
        return True
    else:
        return False


high = ceil(max(h)/b)
low = 0
while(high - low > 1):
    mid = (high + low) // 2
    if(enough(mid)):
        high = mid
    else:
        low = mid
print(mid)


### FIXED CODE ###

from math import ceil
n, a, b = map(int, input().split())
h = [int(input()) for i in range(n)]

def enough(t):
    count = 0
    for hp in h:
        count += ceil(max(0, hp - b*t) / (a-b))
    if(count <= t):
        return True
    else:
        return False


high = ceil(max(h)/b)
low = 0
while(high - low > 0):
    mid = (high + low) // 2
    if(enough(mid)):
        high = mid
    else:
        low = mid + 1
print(low)
from sys import setrecursionlimit
setrecursionlimit(10 ** 5 + 10)

N, M, *XY = map(int, open(0).read().split())

E = [[] for _ in range(N + 1)]
for x, y in zip(*[iter(XY)] * 2):
    E[x].append(y)

memo = {}
def dp(p):
    memo[p] = max((1 + memo.get(c, dp(c)) for c in E[p]), default=0)
    return memo[p]

print(max(dp(p) for p in range(1, N + 1)))

### FIXED CODE ###

from sys import setrecursionlimit
setrecursionlimit(10 ** 5 + 10)

N, M, *XY = map(int, open(0).read().split())

E = [[] for _ in range(N + 1)]
for x, y in zip(*[iter(XY)] * 2):
    E[x].append(y)

memo = {}
def dp(p):
    if p in memo:
        return memo[p]

    memo[p] = max((1 + dp(c) for c in E[p]), default=0)
    return memo[p]

print(max(dp(p) for p in range(1, N + 1)))
# -*- coding:utf-8

X = input()

H = X // 3600

M = (X - H*3600) // 60

S = (X - H*3600) % 60

print('%s:%d:%m' % (H,M,S))


### FIXED CODE ###

# -*- coding: utf-8

X = input()

H = X / 3600
M = (X % 3600) / 60
S = (X % 3600) % 60

print('%d:%d:%d' % (H,M,S))
import math

a,b=map(int,input().split())
print(int((a * b /math.gcd(a, b))))


### FIXED CODE ###

import fractions
 
a,b=map(int,input().split())
print(int((a * b /fractions.gcd(a, b))))
n, m, k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))

if k >= sum(a) + sum(b):
    print(n+m)
    exit()

if n > m:
    b += [1001001001]*(n-m)
else:
    a += [1001001001]*(m-n)

nlis = []
for i in range(n+m):
    if a[0] < b[0]:
        nlis.append(a[0])
        a.remove(a[0])
    else:
        nlis.append(b[0])
        b.remove(b[0])
t = 0
while k >= 0:
    k -= nlis[t]
    t += 1

print(t-1)

### FIXED CODE ###

n, m, k = map(int,input().split())
a = [0] + list(map(int,input().split()))
b = [0] + list(map(int,input().split()))

for i in range(1, n+1):
    a[i] += a[i-1]
    
for j in range(1, m+1):
    b[j] += b[j-1]
    
ans = 0
bc = m

for ac in range(n+1):
    if a[ac] > k:
        continue
    
    while a[ac] + b[bc] > k:
        bc -= 1
        
    ans  = max(ans, ac+bc)

print(ans)
a = int(input(a))
b = int(input(b))
c = a%500
if b >= c:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

a = int(input())
b = int(input())
if a%500 <= b:
  print("Yes")
else:
  print("No")
import sys
input = sys.stdin.readline

M = 10**6
child = [[-1] * 26]
is_end = [False] * M

N = int(input())
S = [input().rstrip()[::-1] for _ in range(N)]
paths = [[] for _ in range(N)]
for i, s in enumerate(S):
    node = 0
    for c in s:
        c = ord(c) - ord('a')
        paths[i].append(node)
        if child[node][c] == -1:
            child[node][c] = len(child)
            child[node].append([-1] * 26)
        node = child[node][c]
    is_end[node] = True

ans = 0
for i, s in enumerate(S):
    suffix = set()
    for j in range(len(s) - 1, -1, -1):
        suffix.add(ord(s[j]) - ord('a'))
        node = paths[i][j]
        for c in suffix:
            ans += is_end[child[node][c]]
print(ans - N)


### FIXED CODE ###

import sys
input = sys.stdin.readline

base = 1999849216943526259
mod = (1 << 61) - 1

N = int(input())
S = [input().rstrip()[::-1] for _ in range(N)]
S.sort(key=lambda s: -len(s))
cnt = {}
ans = 0
one = [0] * 26
for s in S:
    n = len(s)
    if n == 1:
        ans += one[ord(s[0]) - ord('a')]
        continue
    hashes = [0] * (n - 1)
    hashes[0] = ord(s[0])
    for i in range(1, n - 1):
        hashes[i] = (hashes[i-1] * base + ord(s[i])) % mod
    if hashes[-1] in cnt:
        ans += cnt[hashes[-1]][ord(s[-1]) - ord('a')]
    found = [0] * 26
    found[ord(s[-1]) - ord('a')] = 1
    for i in range(n - 2, 0, -1):
        found[ord(s[i]) - ord('a')] = 1
        if hashes[i-1] not in cnt:
            cnt[hashes[i-1]] = [0] * 26
        for c in range(26):
            cnt[hashes[i-1]][c] += found[c]
    found[ord(s[0]) - ord('a')] = 1
    for c in range(26):
        one[c] += found[c]
print(ans)
D,G = map(int,input().split())
l = list(list(map(int, input().split())) for _ in range(D))

#得点の大きい順に並び替えておく
l = l[::-1]

ans = float("inf")
for i in range(2**D):
    total = 0
    cnt = 0
    for j in range(D):
      
    if (i>>j)&1:
            total += 100*(D-j)*l[j][0] + l[j][1]
            cnt += l[j][0]
    if total >= G:
        ans = min(ans,cnt)
        continue
    for j in range(D):
        if (i>>j)&1 == False:
            for k in range(l[j][0]):
                total += 100*(D-j)
                cnt+=1
                if total >= G:
                    ans = min(ans,cnt)
                    break
            #break

print(ans)

### FIXED CODE ###

D,G = map(int,input().split())
l = list(list(map(int, input().split())) for _ in range(D))

#得点の大きい順に並び替えておく
l = l[::-1]

ans = float("inf")
for i in range(2**D):
    total = 0
    cnt = 0
    for j in range(D):
        if (i>>j)&1:
            total += 100*(D-j)*l[j][0] + l[j][1]
            cnt += l[j][0]
    if total >= G:
        ans = min(ans,cnt)
        continue
    for j in range(D):
        if (i>>j)&1 == False:
            for k in range(l[j][0]):
                total += 100*(D-j)
                cnt+=1
                if total >= G:
                    ans = min(ans,cnt)
                    break
            #break

print(ans)
import fractions

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

a = A[0]
for i in range(1, N):
    g = a * A[i] // fractions.gcd(a, A[i])
    a = g
    
b = 0
for i in range(N):
    b = b + g // A[i]

c = b % (1000000007)
print(c)

### FIXED CODE ###

import fractions

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

a = 1
for i in range(N):
    g = a * A[i] // fractions.gcd(a, A[i])
    a = g
    
b = 0
for i in range(N):
    b = b + g // A[i]

c = b % (1000000007)
print(c)
1 < x < 100
x = int(input())
print(x ** 3)

### FIXED CODE ###

x = int(input())
print(x ** 3)
enki_dict={"A":"T","C":"G"}
b = input()
ans = enki_dict["b"]
print(ans)


### FIXED CODE ###

enki_dict={"A":"T","C":"G","T":"A","G":"C"}
b = input()
ans = enki_dict[b]
print(ans)
S = input() 
T = input() 
print(S+T)

### FIXED CODE ###

S,T = input().split()
print(T+S)
S=input()
if S==SUN:
  print('7日後')
elif S==MON:
  print('6日後')
elif S==TUE:
  print('5日後')
elif S==WED:
  print('4日後')
elif S==THU:
  print('3日後')
elif S==FRI:
  print('2日後')
else S==SAT:
  print('1日後')

### FIXED CODE ###

S=input()
if S=='SUN':
  print('7')
elif S=='MON':
  print('6')
elif S=='TUE':
  print('5')
elif S=='WED':
  print('4')
elif S=='THU':
  print('3')
elif S=='FRI':
  print('2')
else:
  print('1')
import math

A,B = map(int, input().split())

print(A*B//math.gcd(A,B))


### FIXED CODE ###

A,B = map(int, input().split())

count = 1
while True:
    if count*A%B == 0:
        print(count*A)
        break
    else:
        count += 1
n = int(input())
max = -100000000
min = 1000000000
sum = 0
a= input().split()
for i in range(0,n):
    sum += a[i]
    if a[i] >= max: max = a[i]
    if a[i] <= min: min = a[i]

print(str(min),str(max),str(sum))


### FIXED CODE ###

n = int(input())
a = sorted([int(x) for x in input().split()])
print(a[0],a[-1],sum(a))
import numpy as np
from  numba import njit
from time import time

@njit
def main(N):
    count=0
    for n in range(1 ,N+1):
        for m in range(n,N+1,n):
            count+=m
    print(count)
if __name__ == "__main__":
    N = int(input())
    main(N)


### FIXED CODE ###

from  numba import njit

@njit
def main(N):
    count=0
    for n in range(1 ,N+1):
        for m in range(n,N+1,n):
            count+=m
    print(count)
if __name__ == "__main__":
    N = int(input())
    main(N)
N,T = map(int, input().strip().split(' '))
t = list(map(int, input().strip().split(' ')))

imos = [0]*(t[-1]+T+1)
for i in t:
  imos[i] += 1
  imos[i+T] -= 1

for i in range(len(imos)-1):
  imos[i+1] += imos[i]
  
print(len([1 for i in imos if i > 0]))

### FIXED CODE ###

N,T = map(int, input().strip().split(' '))
t = list(map(int, input().strip().split(' ')))

ans = 0
for i in range(N-1):
  ans += min(t[i+1]-t[i], T)
print(ans+T)
n = int(input())
a_list = list(map(int, input().split())) # list()を忘れずに

n_division = 0

def odd_detector(a_list):
    is_odd = 0
    for a_i in a_list:
        if a_i % 2 == 1:
            is_odd = 1
            break
    return is_odd

while odd_detector(a_list) == 0:
    a_list = [a/2 for a in a_list]
    n_division += 1

print(n_division)

### FIXED CODE ###

print(input().count("1"))
A, B, C, D = map(list(int, input().split()))

if A*B >= C*D:
	print(A*B)
else:
	print(C*D)

### FIXED CODE ###

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

if A*B >= C*D:
	print(A*B)
else:
	print(C*D)
n,m = map(int,input().split())
a = set([int(input()) for _ in range(M)])
mod = 1000000007
dp = [0] * (n+1)
dp[0] = 1#0段目へ行く移動方法は1通りしかない
if 1 not in a:#もし階段がぶっ壊れてるリストに1段目が入っていないならば1段目へ行く移動方法は1通り、そうでないなら0通り
    dp[1] = 1
else:
    dp[1] = 0
for i in range(2,n+1):#2段目から調べていく
    if i in a:#現在のi段目がぶっ壊れリストに含まれてるなら何もせず飛ばす
        continue
    dp[i] = dp[i-1] + dp[i-2]#フィボナッチで処理
    dp[i] %= mod#modで割っていく
print(dp[n])#n+1番目を出力する

### FIXED CODE ###

N, M = map(int, input().split())
a = set([int(input()) for _ in range(M)])
INF = 1000000007

dp = [0] * (N + 1)
dp[0] = 1
if 1 not in a:
	dp[1] = 1
else:
	dp[1] = 0
for i in range(2, N + 1):
	if i in a:
		continue
	dp[i] = dp[i - 1] + dp[i - 2]
	dp[i] %= INF

print(dp[N])
A, B, C = map(int, input().split())

print(A[0]+B[0]+C[0])


### FIXED CODE ###

A, B, C = input().split()

print(A[0]+B[0]+C[0])
n, k = LI()
a = LI()
l = len(a[:a.index(1)]) + 1
r = len(a[a.index(1):])

if l == 1:
    left = 0
elif l < k:
    left = 1
else:
    left = math.ceil((l - k) / (k - 1)) + 1

if r == 1:
    right = 0
elif r < k:
    right = 1
else:
    right = math.ceil((r - k) / (k - 1)) + 1

print(left + right)

### FIXED CODE ###

import math, sys
def LI(): return [int(x) for x in sys.stdin.readline().split()]


n, k = LI()
a = LI()

result = math.ceil((n - k) / (k - 1)) + 1

print(result)
from bisect import bisect_left,bisect,bisect_right

n,m=map(int,input().split())
a=list(map(int,input().split()))
d=[]
cb=[[0]*2 for i in range(m)]
for i in range(m):
    bi,ci=map(int,input().split())
    cb[i]=[ci,bi]

a.sort()
cb.sort(reverse=True)

asum=0
isum=0
isumm=0
for i in range(m):
    isum+=cb[i][1]
#    print(i,isum,a[isum-1])
    if a[isum-1]<cb[i][0]:
        asum+=cb[i][0]*cb[i][1]
        isumm=isum
        continue
    else:
        ii=bisect(a,cb[i][0])
        asum+=cb[i][0]*(ii-isumm)
#        print(ii,isum,asum)
        asum+=sum(a[ii:isum])
        isumm=isum
        break
    
if isumm<n:
    asum+=sum(a[isumm:])
        
print(asum)


### FIXED CODE ###

import sys
from bisect import bisect_left,bisect,bisect_right

icase=0
if icase==0:
    n,m=map(int,input().split())
    a=list(map(int,input().split()))
    d=[]
    cb=[[0]*2 for i in range(m)]
    for i in range(m):
        bi,ci=map(int,input().split())
        cb[i]=[ci,bi]
elif icase==1:
    n,m=3,2
    a=[1, 4, 5]
    cb=[[5, 1], [3, 2]]
elif icase==3:
    n,m=3,2
    a=[100, 100, 100]
    cb=[[99, 3], [99, 3]]
elif icase==2:
    n,m=10,3
    a=[1, 4, 5, 5, 7, 8, 13, 33, 52, 100]
    cb=[[30, 4], [10, 3], [4, 1]]
elif icase==4:
    n,m=11,3
    a=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
    cb=[[1000000000, 4], [1000000000, 3], [1000000000, 3]]
elif icase==5:
    f=open(r"C:\Users\nishi\999atcoder\ABCD040-151\ABC127D\testcase_13_in.dat")
    ll=f.readline()
    n,m=map(int,ll.split())
    ll=f.readline()
    a=list(map(int,ll.split()))
    d=[]
    cb=[[0]*2 for i in range(m)]
    for i in range(m):
        ll=f.readline()
        bi,ci=map(int,ll.split())
        cb[i]=[ci,bi]
    f.close()
    ans=99913215738299
elif icase==6:
    f=open(r"C:\Users\nishi\999atcoder\ABCD040-151\ABC127D\testcase_12_in.dat")
    ll=f.readline()
    n,m=map(int,ll.split())
    ll=f.readline()
    a=list(map(int,ll.split()))
    d=[]
    cb=[[0]*2 for i in range(m)]
    for i in range(m):
        ll=f.readline()
        bi,ci=map(int,ll.split())
        cb[i]=[ci,bi]
    f.close()
    ans=95821339675952

a.sort()
cb.sort(reverse=True)

if cb[0][0]<=a[0]:
    print(sum(a))
    sys.exit()
    
asum=0
isum=0
isumm=0
for i in range(m):
    isum+=cb[i][1]
    if isum>n:
        if a[-1]<=cb[i][0]:
#        print("A",i)
            asum+=cb[i][0]*(n-isumm)
            print(asum)
            sys.exit()
#    isum=min(isum,n)
#    print(i,isum,a[isum-1])
        else:
#        print("C",i)
            ii=bisect_right(a,cb[i][0])
            asum+=cb[i][0]*(ii-isumm)
#        print(ii,isumm,asum)
#        asum+=sum(a[ii:isum])
            asum+=sum(a[ii:])
            print(asum)
            sys.exit()
    if a[isum-1]<=cb[i][0]:
        asum+=cb[i][0]*cb[i][1]
#        asum+=cb[i][0]*(isum-isumm)
#        print("B",i,isum,asum)
        isumm=isum
        continue
    else:
#        print("C",i)
        ii=bisect_right(a,cb[i][0])
        asum+=cb[i][0]*(ii-isumm)
#        print(ii,isumm,asum)
#        asum+=sum(a[ii:isum])
        asum+=sum(a[ii:])
        print(asum)
        sys.exit()
#        isumm=isum
#        break
    isumm=isum
    
#if isumm<n:
asum+=sum(a[isumm:])
        
print(asum)
N = int(input())
X = list(map(int, input().split()))
d = [dj - di for di, dj in zip(X, X[1:])][::-1]

MOD = 10**9 + 7
count_d = [[0] * (N) for i in range(N-1)]
count_d[0][1] = 1

fac = 1
for n in range(1, N-1):
  fac = fac*n % MOD
  for i in range(1, n+2):
    count_d[n][i] = ((n+1-i+1)*count_d[n-1][i] + (i-1)*count_d[n-1][i-1] + fac)%MOD

ans = 0
for di, ci in zip(d, count_d[-1][1:]):
  ans += di*ci % MOD
  ans %= MOD

print(ans)

### FIXED CODE ###

MOD = 10**9 + 7
N = int(input())
X = list(map(int, input().split()))
D = [dj - di for di, dj in zip(X, X[1:])]

def power(n, r, mod=10**9+7):
    if r == 0: return 1
    if r%2 == 0:
        return power(n*n % mod, r//2, mod) % mod
    if r%2 == 1:
        return n * power(n, r-1, mod) % mod

def framod(n, a=1, mod=10**9+7):
    for i in range(1,n+1):
        a = a * i % mod
    return a

count_d = []
frac_Nm1 = framod(N-1)
for i in range(1, N):
  count_d.append(frac_Nm1 * power(i, MOD-2) % MOD)

for i in range(1, N-1):
  count_d[i] += count_d[i-1]


ans = sum([d*c % MOD for d, c in zip(D, count_d)]) % MOD
print(ans)
S=int(input())
 
h=S/3600
 
m=(S%3600)/60
 
s=(S%3600)%60
 
print('{0}:{1}:{2}'format(h,m,s))

### FIXED CODE ###

S=int(input())
 
h=S//3600
 
m=(S%3600)//60
 
s=(S%3600)%60
 
print('{0}:{1}:{2}'.format(h,m,s))
a, b =map(int, input().spulit())

c = abs(a-b)
print('Yey!' if c<=2 else ':(')

### FIXED CODE ###

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

s = string(input())

if a % 2 == 1:
  print("No")
else:
  b = int(a/2)
  if s[:b] == s[b:]:
    print("Yes")
  else:
    print("No")

### FIXED CODE ###

a = int(input())

s = str(input())

if a % 2 == 1:
  print("No")
else:
  b = int(a/2)
  if s[:b] == s[b:]:
    print("Yes")
  else:
    print("No")
if A == B == C:
  print("No")
elif A == B or B == C or C == A:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

A, B, C = map(int, input().split())
if A == B == C:
  print("No")
elif A == B or B == C or C == A:
  print("Yes")
else:
  print("No")
n,k=map(int,input().split())
x=[int(x) for x in input().split()]
ans=[1]*n
ans[0]=x[0]
for i in range(k,n):
  if x[c]<x[i]:
    print('Yes')
  else:print('No')
  c+=1


### FIXED CODE ###


n,k=map(int,input().split())
x=[int(x) for x in input().split()]
ans=[1]*n
ans[0]=x[0]
c=0
for i in range(k,n):

  if x[c]<x[i]:
    print('Yes')
  else:print('No')
  c+=1
a,b,c = map(int,input().split())
print('A'+b[0]+'C')

### FIXED CODE ###

#09:23
a,b,c = input().split()
print('A'+b[0]+'C')
MB_TLE = 0
MB_WA = 0
MB_RE = o
MB_AC = 0
n=int(input())
for i in range (n):
    ch = input ()
    if (ch =="TLE")
     MB_TLE += 1
    if (ch =="WA")
     MB_WA += 1
    if (ch =="RE")
     MB_RE += 1
    if (ch =="AC")
     MB_AC += 1
print('TLE x ',MB_TLE)
print('WA x ',MB_WA)
print('RE x ',MB_RE)
print('AC x ',MB_AC)


### FIXED CODE ###

N = int(input())
a = N//1000
b = ((a+1)*1000)-N
if b%1000 == 0:
	b = 0
    
print(b)
def gcd(a, b) -> int:
  if(a < b):
    tmp = a
    a = b
    b = tmp
  if b == 0:
    return a
  return gcd(a % b, b)

N = int(input())
ans = int(1)
for i in range(N):
  t = int(input())
  g = gcd(ans, t)
  ans = int(ans * (t / g))
print(ans)

### FIXED CODE ###

def gcd(a, b) -> int:
  if(a < b):
    tmp = a
    a = b
    b = tmp
  if b == 0:
    return a
  return gcd(a % b, b)

def lcm(a, b) -> int:
  g = gcd(a, b)
  return a * (b // g)

N = int(input())
ans = int(1)
for i in range(N):
  t = int(input())
  ans = lcm(ans, t)
print(ans)
N = int(input())

A = [map(int, input().split())]
B = [map(int, input().split())]
C = [map(int, input().split())]

dp = [[0, 0, 0] for _ in range(N)]

dp[0][0] = A[0]
dp[0][1] = B[0]
dp[0][2] = C[0]

for i in range(1, N):
    
    dp[i][0] = max(dp[i - 1][1], dp[i - 1][2]) + A[i]
    dp[i][1] = max(dp[i - 1][2], dp[i - 1][0]) + B[i]
    dp[i][2] = max(dp[i - 1][0], dp[i - 1][1]) + C[i]

print(max(dp[-1]))

### FIXED CODE ###

N = int(input())

A = [0 for _ in range(N)]
B = [0 for _ in range(N)]
C = [0 for _ in range(N)]

for i in range(N):
    A[i], B[i], C[i] = map(int, input().split())

dp = [[0, 0, 0] for _ in range(N)]

dp[0][0] = A[0]
dp[0][1] = B[0]
dp[0][2] = C[0]

for i in range(1, N):
    
    dp[i][0] = max(dp[i - 1][1], dp[i - 1][2]) + A[i]
    dp[i][1] = max(dp[i - 1][2], dp[i - 1][0]) + B[i]
    dp[i][2] = max(dp[i - 1][0], dp[i - 1][1]) + C[i]

print(max(dp[-1]))
# Knapsack問題

import numpy as np

# input
N,W = map(int, input().split())
w = np.zeros(N, dtype=int)
v = np.zeros(N, dtype=int)
for i in range(N):
    a,b = map(int ,input().split())
    w[i] = a 
    v[i] = b 

# calc
dp = [[0 for _ in range(W+1)] for _ in range(N+2)]
dp = np.array(dp, dtype=int)
for i in np.arange(N):
   for j in np.arange(W+1):
        if w[i] <= j:
            dp[i+1,j] = max(dp[i, j-w[i]]+v[i], dp[i,j])
        else:
            dp[i+1,j] = dp[i,j]

print(dp[N,W])


### FIXED CODE ###

# Knapsack問題

# input
N,W = map(int, input().split())
w = []
v = []
for _ in range(N):
    a,b = map(int ,input().split())
    w.append(a)
    v.append(b)

# calc
dp = [[0 for _ in range(W+1)] for _ in range(N+2)]

for i in range(N):
    for j in range(W+1):
        if w[i] <= j:
            dp[i+1][j] = max(dp[i][j-w[i]]+v[i], dp[i][j])
        else:
            dp[i+1][j] = dp[i][j]

print(dp[N][W])
N,K = map(int,input().split())
P = [int(input()) for i in range(N)]
Q = []*N
for i in range(N):
  Q[i] = (P[i]+1)/2
R = 0
for j in range(K):
  R += Q[j]
for k in range(N-K)
  R = R - Q[k] + Q[k+K]
  ans = max(R)
print(ans)

### FIXED CODE ###

N,K = map(int,input().split())
P = list(map(int,input().split()))
for i in range(N):
  P[i] = (P[i]+1)/2
now = sum(P[:K])
ans = now
for j in range(N-K):
  now = now - P[j] + P[j+K]
  ans = max(ans,now)
print(ans)
N = int(input())
S = input()
count = 0


for i in range(1, N-1):
    for j in range(i+1, N):
        if S[i-1] == S[j-1]:
            pass
        else:
            for k in range(j+1, N+1):
                if (S[i-1] != S[k-1]) and (S[j-1] != S[k-1]) and ((j-i) != (k-j)):
                    count += 1

print(count)

### FIXED CODE ###

N = input()

flag = 0

if N[0] == '7':
    flag = 1
if N[1] == '7':
    flag = 1
if N[2] == '7':
    flag = 1

if flag == 1:
    print('Yes')
else:
    print('No')