Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

import copy
s = input()
n = len(s)
mod = 10**9+7

moji = [[0,0,0,0] for _ in range(n+1)]

for i in range(1,n+1):
    moji[i] = copy.copy(moji[i-1])
    if s[i-1] == 'A':
        moji[i][0] += 1
    elif s[i-1] == 'B':
        moji[i][1] += 1
    elif s[i-1] == 'C':
        moji[i][2] += 1
    else:
        moji[i][3] += 1

ans = 0
for i in range(n):
    al,cr,hl,hr = moji[i][0], moji[n][2]-moji[i+1][2], moji[i][3], moji[n][3]-moji[i+1][3]
    if s[i] == 'B' or s[i] == '?':
        k = (al*3 + hl) * (cr*3 + hr) * 3**(hr+hl-2)
        ans += int(k) % mod
print(ans%mod)


### FIXED CODE ###

s = input()
n = len(s)
mod = 10**9+7

moji = [[0,0,0,0] for _ in range(n+1)]

for i in range(1,n+1):
    for k in range(4):
        moji[i][k] += moji[i-1][k]
    if s[i-1] == 'A':
        moji[i][0] += 1
        continue
    elif s[i-1] == 'B':
        moji[i][1] += 1
        continue
    elif s[i-1] == 'C':
        moji[i][2] += 1
        continue
    else:
        moji[i][3] += 1

h = s.count('?')
mt = [1]
for i in range(h+1):
    mt.append(mt[-1]*3 % mod)
mt += [1/9,1/3]
ans = 0
for i in range(n):
    al,cr,hl,hr = moji[i][0], moji[n][2]-moji[i+1][2], moji[i][3], moji[n][3]-moji[i+1][3]
    if s[i] == 'B' or s[i] == '?':
        k = (al*3 + hl) * (cr*3 + hr) * mt[hr+hl-2]
        ans += int(k) % mod
print(ans%mod)
### BUGGY CODE ###

import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N, K = mapint()
As = list(mapint())

now = 1
for i in range(N):
    a = As[i]
    if i<K:
        now*=a
    else:
        past = now
        now = now*a//As[i-K]
        if now>past:
            print('Yes')
        else:
            print('No')
    

### FIXED CODE ###

import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N, K = mapint()
As = list(mapint())

now = 1
for i in range(N):
    a = As[i]
    if i<K:
        pass
    else:
        past = As[i-K]
        now = a
        if now>past:
            print('Yes')
        else:
            print('No')
### BUGGY CODE ###

n, m = [int(x) for x in input().split()]
lst = []
for _ in range(m):
    l, r = [int(x) for x in input().split()]
    lst.append(set(range(l, r+1)))

uni = lst[0].intersection(*lst[1:])
print(len(uni))

### FIXED CODE ###

n, m = [int(x) for x in input().split()]
l_lst = []
r_lst = []
for _ in range(m):
    l, r = [int(x) for x in input().split()]
    l_lst.append(l)
    r_lst.append(r)

l_max = max(l_lst)
r_min = min(r_lst)

if l_max <= r_min:
    num = r_min - l_max + 1
else:
    num = 0
print(num)
### BUGGY CODE ###

n = int(input())
s = list(map(int,input()))
ans =[]
for i in range(n):
    for j in range(i+1,n):
        for k in range(j+1,n):
            ans.append(s[i]*100+10*s[j]+s[k])
print(len(set(ans)))

### FIXED CODE ###

n = int(input())
s = str(input())

number_i = list(range(10))
ans = 0

for i in range(n-2):
    if int(s[i]) in number_i:
        number_i.remove(int(s[i]))
        number_j = list(range(10))
        #print(number_i)

        for j in range(i+1,n-1):
            if int(s[j]) in number_j:
                number_j.remove(int(s[j]))
                number_k = list(range(10))

                for k in range(j+1,n):
                    if int(s[k]) in number_k:
                        number_k.remove(int(s[k]))
                        ans += 1
                        #print(int(s[i])*100+int(s[j])*10+int(s[k]))

print(ans)
### BUGGY CODE ###

import sys

def main():

	s = list(input())

	dp = [[0 for _ in range(13)]for _ in range(len(s)+1)]
	MOD = 10**9+7
	if s[-1] == '?':
		for i in range(10):
			dp[1][i] = 1
	else:
		dp[1][int(s[-1])] = 1

	for i in range(1,len(s)):
		if s[-i-1] != '?':
			num = (int(s[-i-1]) * (10**i)) % 13
			for j in range(13):
				dp[i+1][j] = dp[i][(13-num+j)%13]
				dp[i+1][j] % MOD
		else:
			for j in range(10):
				num = j * (10**i) % 13
				for k in range(13):
					dp[i+1][k] += dp[i][(13-num+k)%13]
					dp[i+1][k] % MOD

	print(dp[len(s)][5] % MOD)

if __name__ == '__main__':
	main()

### FIXED CODE ###

INF = 10 ** 9 + 7

S = input()
# dp[i][j]はうしろからi桁を13で割った余りがjであるものの個数
dp = [[0] * 13 for _ in range(len(S) + 1)]
dp[0][0] = 1
mul = 1

for i in range(len(S)):
    x = S[-(i + 1)]
    if x == "?":
        for k in range(10):
            for j in range(13):
                dp[i + 1][(mul * k + j) % 13] += dp[i][j]
                dp[i + 1][(mul * k + j) % 13] %= INF
    else:
        k = int(x)
        for j in range(13):
            dp[i + 1][(mul * k + j) % 13] += dp[i][j]
            dp[i + 1][(mul * k + j) % 13] %= INF
    mul = mul * 10 % 13  # 計算量削減のためここで13で割っている

print(dp[len(S)][5])
### BUGGY CODE ###

import sys
sys.setrecursionlimit(500000)
H,W=map(int,input().split())
S=list(list(input())for _ in range(H))

def dfsr(h,w):
    if 0<=h<=H-1 and 0<=w<=W-1 and S[h][w]=='.':
        global ans
        ans+=1
        dfsr(h,w+1)
    else:return
def dfsl(h,w):
    if 0<=h<=H-1 and 0<=w<=W-1 and S[h][w]=='.':
        global ans
        ans+=1
        dfsl(h,w-1)
    else:return

def dfsd(h,w):
    if 0<=h<=H-1 and 0<=w<=W-1 and S[h][w]=='.':
        global ans
        ans+=1
        dfsd(h+1,w)
    else:return

def dfsu(h,w):
    if 0<=h<=H-1 and 0<=w<=W-1 and S[h][w]=='.':
        global ans
        ans+=1
        dfsu(h-1,w)
    else:return

rans=0
ans=0
for h in range(H):
    for w in range(W):
        ans=0
        if S[h][w]=='.':
            dfsr(h,w+1)
            dfsl(h,w-1)
            dfsu(h-1,w)
            dfsd(h+1,w)
            ans+=1
            rans=max(ans,rans)
print(rans)

### FIXED CODE ###

H,W=map(int,input().split())
S=list(list(input()) for _ in range(H))
ans=0
for i in S:
    for j in range(W):
        if i[j]!='#' and j!=W-1:
            ans+=1
        elif i[j]!='#'and j==W-1 :
            for k in range(ans+1):
                i[j-k]=ans+1
            ans=0
        else:
            for k in range(1,ans+1):
                i[j-k]=ans
            ans=0
S_t=list(map(list,zip(*S)))
ans=0
for i in S_t:
    for j in range(H):
        if i[j]!='#' and j!=H-1:
            ans+=1
        elif i[j]!='#'and j==H-1 :
            for k in range(ans+1):
                i[j-k]+=ans+1
            ans=0
        else:
            for k in range(1,ans+1):
                i[j-k]+=ans
            ans=0
            i[j]=0
c=0
for i in S_t:
    c=max(c,max(i))
print(c-1)
### BUGGY CODE ###

N = int(input())
uvw = [[int(x) for x in input().split()] for _ in range(N-1)]

path = [[] for _ in range(N)]

ans = [-1]*N
ans[0] = 0

for u,v,w in uvw:
    path[u-1].append([v-1,w%2])
    path[v-1].append([u-1,w%2])
    
Q = [0]     
while Q:
    v = Q.pop(0)
    for p,d in path[v]:
        if ans[p] == -1:
            ans[p] = (ans[v]+d)%2
            Q.append(p)
            
for a in ans:
    print(a)


### FIXED CODE ###

N = int(input())
uvw = [[int(x) for x in input().split()] for _ in range(N-1)]

path = [[] for _ in range(N)]

ans = [-1]*N
ans[0] = 0

for u,v,w in uvw:
    path[u-1].append([v-1,w%2])
    path[v-1].append([u-1,w%2])
    
Q = [0]     
while Q:
    v = Q.pop(-1)
    for p,d in path[v]:
        if ans[p] == -1:
            ans[p] = (ans[v]+d)%2
            Q.append(p)
            
for a in ans:
    print(a)
### BUGGY CODE ###

N = int(input())
counter = 0
for n in range(1, N):
    for i in range(1, int(n ** 0.5) + 1):   
        if n % i == 0:
            if i != n // i: 
                counter += 2
            else:
                counter += 1

print(counter)

### FIXED CODE ###

N = int(input())

N_m1 = N - 1
counter = 0
for i in range(1, N_m1 + 1):
    counter += N_m1 // i

print(counter)
### BUGGY CODE ###


def main():
    s = int(input())

    saidai = 10 ** 9

    for i in range(1, int(s ** 0.5) + 1):
        teihenn = i
        if s % teihenn != 0:
            continue
        takasa = s // teihenn

        if teihenn <= saidai and takasa <= saidai:
            break

    print(0, 0, teihenn, 0, 0, takasa)




if __name__ == '__main__':
    main()

### FIXED CODE ###


import math

def main():
    s = int(input())
    max_num = 10 ** 9
    y = math.ceil(s / (max_num))
    x = y * max_num - s

    print(0, 0, max_num, 1, x, y)




if __name__ == '__main__':
    main()
### BUGGY CODE ###

import itertools

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

ans = 'No'

for i in itertools.product([True, False], repeat=N):
    if sum([A[j] for j in range(len(A)) if i[j]]) == H:
        ans = 'Yes'
print(ans)

### FIXED CODE ###

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

total = sum(A)
if total >= H:
    print('Yes')
else:
    print('No')
### BUGGY CODE ###

n,q=map(int,input().split())
s=input()

for i in range(q):
    l,r=map(int,input().split())
    m=0
    for j in range(l-1,r-1):
            if s[j]=="A" and s[j+1]=="C":
                m+=1
    print(m)



### FIXED CODE ###

n,q=map(int,input().split())
s=input()
t=[0]*(n+1)
for i in range(n):
    t[i+1]=t[i]+(1 if s[i:i+2]=="AC" else 0)

for i in range(q):
    l,r=map(int,input().split())
    print(t[r-1]-t[l-1])
### BUGGY CODE ###

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

for i in range(n-k+1):
  if sum(p[i:i+k]) > m:
    m = sum(p[i:i+k])
    x = i

ans = 0    
for i in range(x, x+k):
  ans += (p[i] + 1) / 2

print("{0:.12f}".format(ans))

### FIXED CODE ###

n, k = map(int, input().split())
p = list(map(int, input().split()))
  
m = sum(p[0: k])
sump = m

for i in range(1, n-k+1):
  sump = sump - p[i-1] + p[i+k-1]
  if m < sump:
    m = sump

ans = (m + k) / 2

print(ans)
### BUGGY CODE ###

import sys
import math
from collections import deque

sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, m=DVSR): return pow(x, m - 2, m)
def DIV(x, y, m=DVSR): return (x * INV(y, m)) % m
def LI(): return [int(x) for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()
def II(): return int(input())
def FLIST(n):
    res = [1]
    for i in range(1, n+1): res.append(res[i-1]*i%DVSR)
    return res

N,M=LI()
RES = [-1]*(N+1)
RES[N] = 0.0

MP={}
for _ in range(M):
    i, j = LI()
    if not i in MP: MP[i] = []
    MP[i].append(j)
# print(MP)

for i in range(N-1, 0, -1):
    div = len(MP[i])
    next_E = 0
    for j in MP[i]: next_E += RES[j] + 1
    RES[i] = next_E / div

len_1 = len(MP[1])

# print("len_1: {}".format(len_1))
# print(RES)


result = 10.0**15
RESN = [0]*(N+1)
for i in range(1, N-1):
    skip = False
    max_j, max_value = 0, 0

    for j in MP[i]:
        if RES[j] > max_value:
            max_value = RES[j]
            max_j = j

    for k in range(N-1, 0, -1):
        div = 0
        next_E = 0
        for j in MP[k]:
            if k != i or j != max_j:
                div += 1
                next_E += RESN[j] + 1
        if div == 0:
            skip = True
            break
        else:
            RESN[k] = next_E / div
    if not skip:
        result = min(result, RESN[1])

print(min(result, RES[1]))


### FIXED CODE ###

def resolve():
    n,m=map(int,input().split())
    edges=[[] for _ in range(n)]
    for _ in range(m):
        s,t=map(int,input().split())
        s-=1; t-=1
        edges[s].append(t)
 
    # 確率DP
    p=[0]*n
    p[0]=1.0
    for v in range(n):
        for nv in edges[v]:
            p[nv]+=p[v]/len(edges[v])
 
    # 期待値DP
    E=[0]*n
    for v in range(n-2,-1,-1):
        for nv in edges[v]:
            E[v]+=E[nv]
        E[v]=1+E[v]/len(edges[v])
 
    ans=E[0]
    for v in range(n):
        if(len(edges[v])<=1): continue
        # 各vに対して、辺vwのうちE[w]が最大のものを削除する
        w=max(*((E[w],w) for w in edges[v]))[1]
        dE=0
        deg=len(edges[v])
        for nv in edges[v]:
            if(nv==w): dE-=E[nv]/deg
            else: dE+=E[nv]/(deg-1)/deg
        ans=min(ans,E[0]+p[v]*dE)
 
    print(ans)
resolve()
### BUGGY CODE ###

N = int(input())
L = map(int, input().split())

from itertools import combinations
X = list(combinations(L, 3))

ans = 0
for a,b,c in X:
    if a < b + c and b < c + a and c < a + b:
        ans += 1

print(ans)

### FIXED CODE ###

N = int(input())
L = map(int, input().split())
SL = sorted(list(L))
# print('SL', SL)
import bisect

ans = 0
for i in range(N-2):
    for j in range(i+1, N-1):
        ab = SL[i] + SL[j]
        # print(i, j)
        # print(SL[i], SL[j])
        r = bisect.bisect_left(SL, ab)
        l = j + 1
        # print('r', r)
        # print('l', l)
        # print('---')
        ans += max(0, r - l)

print(ans)
### BUGGY CODE ###

from collections import defaultdict
N = int(input())
A = list(map(int, input().split()))
dic = defaultdict(int)
for a in A:
  dic[a] += 1

A = list(set(A))
A.sort()
B = []
ans = 0
for a in A:
  flag = True
  for b in B:
    if a % b == 0:
      flag = False
      break

  if flag:
    B += [a]
    if dic[a] == 1:
      ans += 1

print(ans)
      

"""E問題"""

### FIXED CODE ###

from collections import defaultdict
N = int(input())
A = list(map(int, input().split()))
mx = max(A)+1
B = [0]*(mx)
dic = defaultdict(int)
for a in A:
  dic[a] += 1

A = sorted(list(set(A)))
ans = 0
for a in A:
  if B[a] == 0:
    if dic[a] == 1:
      ans += 1
  for i in range(a, mx, a):
    B[i] += 1

print(ans)
### BUGGY CODE ###

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

def main():
    stdIn1, stdIn2 = map(int, input().split())
    stdOut = solve(stdIn1, stdIn2)
    print(stdOut)


"""
方針
x,y,zそれぞれを3重ループで0からkまで回す
(O(N^3)だが、k<=2500なので気にならない)
x+y+zが等しければパターンを1追加

"""


def solve(k, s):
    pattern = 0
    for x in range(k+1):
        for y in range(k+1):
            for z in range(k+1):
                if (x+y+z == s):
                    pattern += 1
    return pattern


if __name__ == "__main__":
    main()


### FIXED CODE ###

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

def main():
    stdIn1, stdIn2 = map(int, input().split())
    stdOut = solve(stdIn1, stdIn2)
    print(stdOut)


"""
方針
x,y,zそれぞれを3重ループで0からkまで回す
(O(N^3)だが、k<=2500なので気にならない)
x+y+zが等しければパターンを1追加

TLEになったので、もう少し節約するパターンを考える必要あり
ひとまずx,x+y,x+y+zがsより大きなった場合はbreakさせてループを抜ける処理にしてみる
まだTLEになるので、もう少し考える
実はzはループする必要はなく z = s - (x + y) <= k であれば +1, > k であれば continueでよい
これでO(N^2)に計算量を抑えられる

"""


def solve(k, s):
    pattern = 0
    for x in range(k+1):
        if x > s:
            break
        for y in range(k+1):
            if x + y > s:
                break
            z = s - x - y
            if z <= k:
                pattern += 1

    return pattern


if __name__ == "__main__":
    main()
### BUGGY CODE ###

n=int(input())
s=list(input() for _ in range(n))

t=['']*n

for i in range(n):
	t[i]=sorted(s[i])

u=sorted(t)

cnt=0

for i in range(n-1):    
	seq=0
	for j in range(i+1,n):
		if u[i]==u[j]:
			cnt+=1
			seq=1
		else:
			if seq==1:
				break

print(cnt)

### FIXED CODE ###

n=int(input())
s=list(input() for _ in range(n))

t=['']*n

for i in range(n):
	t[i]=sorted(s[i])

u=sorted(t)

cnt=0

#for i in range(n-1):    
#	for j in range(i+1,n):
#		if u[i]!=u[j]:
#			break
#		else:
#			cnt+=1

cnt_a=0
cnt_b=0

u.append(['0'])

#print(u)


for i in range(n):
	if u[i+1]==u[i]:
		cnt_a+=1
		#print(cnt_a)
	else:
		if cnt_a>0:
			cnt_b+=(cnt_a+1)*cnt_a//2
			#print(cnt_b)
			cnt_a=0

print(cnt_b)
### BUGGY CODE ###

n,k = map(int,input().split())
health = list(map(int,input().split()))
s_health = sorted(health,reverse=True)
if n <= k:
    print(0)
    exit()
    
for i in range(k):
    del s_health[0]

print(sum(s_health))

### FIXED CODE ###

n,k = map(int,input().split())
health = list(map(int,input().split()))
s_health = sorted(health)
if n <= k:
    print(0)
    exit()

print(sum(s_health[:n-k]))
### BUGGY CODE ###

N = int(input())
A = list(map(int, input().split()))
MOD = 10 ** 9 + 7
mask = 1
ret = 0
for i in range(70):
    on = 0
    off = 0
    for a in A:
        if a & mask:
            on += 1
        else:
            off += 1
    ret += (on * off) * mask
    ret %= MOD
    mask *= 2

print(ret)
    


### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
MOD = 10 ** 9 + 7
mask = 1
ret = 0
for i in range(70):
    on = 0
    off = 0
    for a in A:
        if a & mask:
            on += 1
        else:
            off += 1
    ret += (on * off) * mask
    ret %= MOD
    mask *= 2

print(ret)
### BUGGY CODE ###

import itertools
 
N = int(input())
A = list(map(int,input().split()))
 
comb = itertools.combinations(range(N), 2)
ans = 0
 
for c in comb:
  if A[c[0]]+A[c[1]] == abs(c[0]-c[1]):
    ans += 1
 
print(ans)

### FIXED CODE ###

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

L={}
R={}
for i in range(1,len(A)+1):
  L[str(i+A[i-1])] = L.get(str(i+A[i-1]),0)+1
  R[str(i-A[i-1])] = R.get(str(i-A[i-1]),0)+1

ans = 0
for i in range(1,N+1):
  if str(i) in L and str(i) in R:
    ans += L[str(i)] * R[str(i)]

print(ans)
### BUGGY CODE ###

import sys

import numpy as np

readline = sys.stdin.buffer.readline


def f(N, K, A):
    p = 0
    for i in range(K):
        C = np.zeros(N + 1, dtype=np.int64)

        for j, a in enumerate(A):
            l = max(0, j - a)
            r = min(j + a + 1, N)
            C[l] += 1
            C[r] -= 1

        A = np.cumsum(C)

        if len(set(A)) == 1:
            p += 1
            if p == 2:
                break
    return A


def solver():
    N, K = map(int, readline().split())
    A = list(map(int, readline().split()))
    A = f(N, K, A)
    print(*A[:-1])


solver()


### FIXED CODE ###

import sys

from numba import njit

import numpy as np

readline = sys.stdin.buffer.readline


@njit('i8[:](i8, i8, i8[:])', cache=True)
def f(N, K, A):
    for i in range(min(K, 100)):
        C = np.zeros(N + 1, dtype=np.int64)

        for j, a in enumerate(A):
            l = max(0, j - a)
            r = min(j + a + 1, N)
            C[l] += 1
            C[r] -= 1

        A = np.cumsum(C)

    return A


def solver():
    N, K = map(int, readline().split())
    A = list(map(int, readline().split()))
    A = f(N, K, np.array(A))
    print(*A[:-1])


solver()
### BUGGY CODE ###

def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 #出力の制限
N = 10**7
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )


x,y=map(int,input().split())

if (2*y-x)%3!=0 or (2*x-y)%3!=0:
    print(0)
else:
    k=(2*y-x)//3
    l=(2*x-y)//3
    a = cmb(k+l,l,mod)
    print(a)


### FIXED CODE ###

'''
def comb(n,k,p):
  """power_funcを用いて(nCk) mod p を求める"""
  from math import factorial
  if n<0 or k<0 or n<k: return 0
  if n==0 or k==0: return 1
  a=factorial(n) %p
  b=factorial(k) %p
  c=factorial(n-k) %p
  return (a*power_func(b,p-2,p)*power_func(c,p-2,p))%p

def power_func(a,b,p):
  """a^b mod p を求める"""
  if b==0: return 1
  if b%2==0:
    d=power_func(a,b//2,p)
    return d*d %p
  if b%2==1:
    return (a*power_func(a,b-1,p ))%p
'''

def comb_mod(n, r, MOD):
    if n < 0 or r < 0 or n < r:
        return 0

    factrial = [1] * (n+1)
    for k in range(1, n+1):
        factrial[k] = (factrial[k-1] * k) % MOD

    fact_inv = [1] * (n+1)
    fact_inv[n] = pow(factrial[n], MOD - 2, MOD)
    for k in range(n-1, -1, -1):
        fact_inv[k] = (fact_inv[k+1] * (k+1)) % MOD

    return (factrial[n] * fact_inv[r] * fact_inv[n-r]) % MOD

x,y=map(int,input().split())

if (2*y-x)%3!=0 or (2*x-y)%3!=0:
    print(0)
else:
    k=(2*y-x)//3
    l=(2*x-y)//3
    a = comb_mod(k+l,l,10**9+7)
    print(a)
### BUGGY CODE ###

import math

n,p=map(int,input().split())

def C(N,P):
    if N == 1: return P
    b=int(math.log2(N))
    a=int(P**(1/b))+2

    res=1
    for i in range(2,a):
        if i**N > P : break
        if P % i**N == 0 : res = i

    return res

print(C(n,p))

### FIXED CODE ###

n,p = list(map(int,input().split())) 
i = a = o = 1
m = round(p**(1/n))
for i in range(m,0,-1):
    a = i**n
    if p%a==0:
        print(i)
        exit()
### BUGGY CODE ###

# -*- coding: utf-8 -*-


# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return map(int, input().split())


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


def main():
    n, k = input_to_int_map()
    a_array = input_to_int_tuple()

    temp = [1]
    val = 1
    for a in a_array:
        val *= a
        temp.append(val)

    pre_k_val = temp[k + 1 - 1]
    ini_pre_k_val = temp[k + 1 - 1 - k]
    pre_k_val /= ini_pre_k_val
    for i in range(k + 1, n + 1):
        k_val = temp[i]
        ini_k_val = temp[i - k]
        k_val /= ini_k_val

        if pre_k_val < k_val:
            print("Yes")
        else:
            print("No")

        pre_k_val = k_val


if __name__ == "__main__":
    main()


### FIXED CODE ###

# -*- coding: utf-8 -*-


# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return map(int, input().split())


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


def main():
    n, k = input_to_int_map()
    a_array = input_to_int_tuple()

    for k_val, pre_k_val in zip(a_array[k:], a_array[k - k:]):
        if k_val > pre_k_val:
            print("Yes")
        else:
            print("No")

if __name__ == "__main__":
    main()
### BUGGY CODE ###

h, w = map(int, input().split())
grid = [[0]*(w+2) for _ in range(h+2)]

black = []
for i in range(h):
    for j, k in enumerate(input()):
        if k == "#":
            black.append((i + 1, j + 1))
            grid[i+1][j+1] = 1

ans = 0
d = ((0, 1),
     (1, 0),
     (0, -1),
     (-1, 0),)
while True:
    paint = []
    while black:
        x, y = black.pop()
        if x == 0 or x == h + 1 or y == 0 or y == w + 1:
            continue
        else:
            for nx, ny in d:
                if not grid[nx + x][ny + y]:
                    if x+nx == 0 or x+nx == h + 1 or y+ny == 0 or y+ny == w + 1:
                        continue
                    grid[nx + x][ny + y] = 1
                    paint.append((nx + x, ny + y))

    if len(paint) == 0:
        break
    black = paint[:]
    ans += 1

print(ans)


### FIXED CODE ###

h, w = map(int, input().split())
grid = [[0]*(w+2) for _ in range(h+2)]

black = []
for i in range(h):
    for j, k in enumerate(input()):
        if k == "#":
            black.append((i + 1, j + 1))
            grid[i+1][j+1] = 1

ans = 0
d = ((0, 1),
     (1, 0),
     (0, -1),
     (-1, 0),)
while True:
    paint = []
    while black:
        x, y = black.pop()
        if x == 0 or x == h + 1 or y == 0 or y == w + 1:
            continue
        else:
            for nx, ny in d:
                if not grid[nx + x][ny + y]:
                    if x+nx == 0 or x+nx == h + 1 or y+ny == 0 or y+ny == w + 1:
                        continue
                    grid[nx + x][ny + y] = 1
                    paint.append((nx + x, ny + y))

    if len(paint) == 0:
        break
    black = paint[:]
    ans += 1

print(ans)