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

n,m=[int(x) for x in input().split()]
v=[int(x) for x in input().split()]
def insert(list, n): 
	j=0
	for j in range(len(list)): 
		if list[j] > n: 
			break
      
	list = list[:j] + [n] + list[j:] 
	return list
v.sort()
while (m>0):
	if (v[-1]==0):
		break
	k=v[-1]/2
	del v[-1]
	v=insert(v,k)
	m-=1
i,sum=0,0
while(i<n):
	sum+=int(v[i])
	i+=1
print(sum)

### FIXED CODE ###

#coding:utf-8
 
import heapq
 
N, M = map(int, input().split())
invA = []
for a in map(int, input().split()):
    heapq.heappush(invA, -1*a)
for m in range(M):
    heapq.heappush(invA, heapq.heappop(invA)/2)
total = -1*sum(map(int, invA))
 
print(total)
### BUGGY CODE ###

a, b, k = [int(i) for i in input().split()]
s1 = {x for x in range(a, b+1) if a + k > x}
s2 = {x for x in range(a, b+1) if b - k < x}
for i in sorted(list(s1 | s2)):
    print(i)


### FIXED CODE ###

a, b, k = [int(i) for i in input().split()]
s = set()
for i in range(a, a+k):
    if i in range(a, b+1):
        s.add(i)

for i in range(b-k+1, b+1):
    if i in range(a, b+1):
        s.add(i)

for i in sorted(list(s)):
    print(i)
### BUGGY CODE ###

def solve():
    N = int(input())
    S2 = [0]*N
    for i in range(N):
        S2[i] = input()
    ans = 0
    for k in range(N):
        cum = [[0]*(N+1) for _ in range(N+1)]
        for i in range(1,N+1):
            for j in range(1,N+1):
                cum[i][j] = cum[i-1][j]+cum[i][j-1]-cum[i-1][j-1]+(S2[i-1][j-1]==S2[(j-1+k)%N][(i-1-k)%N])
                if i==N and j==N:
                    ans += (cum[i][j]==N*N)*N
    return ans
print(solve())

### FIXED CODE ###

def solve():
    N = int(input())
    S2 = [0]*N
    for i in range(N):
        S2[i] = input()
    ans = 0
    for k in range(N):
        cum = [[0]*(N+1) for _ in range(N+1)]
        for i in range(1,N+1):
            for j in range(1,N+1):
                cum[i][j] = cum[i-1][j]+cum[i][j-1]-cum[i-1][j-1]+(S2[i-1][j-1]==S2[(j-1+k)%N][(i-1-k)%N])
                if i==N and j==N:
                    ans += (cum[i][j]==N*N)*N
    return ans
print(solve())
### BUGGY CODE ###

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

for i in range(M//N+1)[::-1]:
    if M % i == 0:
        print(i)
        break
else:
    print(1)

### FIXED CODE ###

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

for i in range(M//N+1)[::-1]:
    if M % i == 0:
        print(i)
        break
else:
    print(1)
### BUGGY CODE ###

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

dp = [[0] * (K+10) for _ in range(N+1)]
dp[0][0] = 1
for i in range(N):
    for j in range(K,-1,-1):
        dp[i+1][j] += dp[i][j]
        dp[i+1][j] %= MOD
        if j + A[i] + 1 <= K+1:
            dp[i+1][j+A[i]+1] = (dp[i+1][j+A[i]+1] - dp[i][j] + MOD) % MOD
    
    for j in range(K+1):
        dp[i+1][j+1] += dp[i+1][j]
        dp[i+1][j+1] %= MOD

print(dp[N][K])


### FIXED CODE ###

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

dp = [[0] * (K+10) for _ in range(N+1)]
dp[0][0] = 1
for i in range(N):
    for j in range(K,-1,-1):
        dp[i+1][j] += dp[i][j]
        dp[i+1][j] %= MOD
        if j + A[i] + 1 <= K+1:
            dp[i+1][j+A[i]+1] = (dp[i+1][j+A[i]+1] - dp[i][j] + MOD) % MOD
    
    for j in range(K+1):
        dp[i+1][j+1] += dp[i+1][j]
        dp[i+1][j+1] %= MOD

print(dp[N][K])
### BUGGY CODE ###

N,K=map(int,input().split())
H=list(map(int, input().split()))
#Nモンスターの数、K必殺回数（モンスターは体力ゼロになる）、Hモンスターの数と各々の体力
H=sorted(H,reverse=True)
if K>=len(H):
  print(0)
else:
  for i in range(0,K):
    del H[0]
  result=sum(H)
  print(result)

### FIXED CODE ###

N,K=map(int,input().split())
H=list(map(int, input().split()))
#Nモンスターの数、K必殺回数（モンスターは体力ゼロになる）、Hモンスターの数と各々の体力
H=sorted(H)
if K>=len(H):
  print(0)
else:
  for i in range(0,K):
    del H[-1]
  result=sum(H)
  print(result)
### BUGGY CODE ###

import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def get_yakusu(n):
    ans = set()
    for i in range(1, int(math.sqrt(n)) + 2):
        if n % i == 0:
            if i != 1:
                ans.add(i)
            if n // i != i:
                ans.add(n // i)
    return ans

def main():
    N = I()
    cnt = 0
    yakusu = get_yakusu(N)
    n1yakusu = get_yakusu(N-1)
    for n in yakusu:
        cpN = N
        while cpN % n == 0:
            cpN //= n
        if cpN % n == 1:
            cnt += 1
    cnt += len(n1yakusu)
    print(cnt)
main()



### FIXED CODE ###

import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()

def get_yakusu(n):
    ans = set()
    for i in range(1, int(math.sqrt(n)) + 2):
        if n % i == 0:
            if i != 1:
                ans.add(i)
            if n // i != i:
                ans.add(n // i)
    return ans

def main():
    N = I()
    cnt = 0
    yakusu = get_yakusu(N)
    n1yakusu = get_yakusu(N-1)
    for n in yakusu:
        cpN = N
        loop = 0
        while True:
            loop += 1
            if loop > 100:
                break
            if cpN % n == 0:
                cpN = cpN // n
            else:
                break
        if cpN % n == 1:
            cnt += 1
    cnt += len(n1yakusu)
    print(cnt)
main()
### BUGGY CODE ###

N = int(input())
A = map(int, input().split())
ans = 1
for a in A:
  ans *= a
  if ans == 0:
    break
print(ans if ans<=10**18 else -1)



### FIXED CODE ###

import sys

N = int(input())
A = list(map(int, input().split()))
ans = 1
if 0 in A:
    print(0)
    sys.exit()

for a in A:
    ans *= a
    if ans > 1e18:
        print(-1)
        sys.exit()
print(ans)
### BUGGY CODE ###

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

MOD = 998244353

dp = [[0]*(s+1) for i in range(n+1)]
dp[0][0] = 1

for i in range(n):
    for ss in range(s+1):
        if(ss >= a[i]):
            dp[i+1][ss] = (dp[i][ss]*2 + dp[i][ss-a[i]])%MOD
        else:
            dp[i+1][ss] = dp[i][ss]*2 % MOD

print(dp[n][s])

### FIXED CODE ###

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

MOD = 998244353

dp = [[0]*(s+1) for i in range(n+1)] #動的計画法を用いる
dp[0][0] = 1

for i in range(n):
    for ss in range(s+1):
        if(ss >= a[i]):
            dp[i+1][ss] = (dp[i][ss]*2 + dp[i][ss-a[i]])%MOD #非常に大きな数になると考えられるため先にMOD計算を行う
        else:
            dp[i+1][ss] = dp[i][ss]*2 % MOD

print(dp[n][s])
### BUGGY CODE ###

n = int(input())
a = list(map(int, input().split()))
t = 1
for i in range(n):
    t = t*a[i]
    if t == 0:
        print("0", end="")
        exit()
if t > 10**18:
    print("-1", end="")
    exit()
print(t, end="")


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
t = 1
if 0 in a:
    print("0", end="")
    exit()

for i in range(n):
    t = t*a[i]
    if t > 10**18:
        print("-1", end="")
        exit()
print(t, end="")
### BUGGY CODE ###

n = int(input())
inputs = [0,0,0,0,0]
inputs[0] = int(input())

inputs[1] = int(input())

inputs[2] = int(input())

inputs[3] = int(input())

inputs[4] = int(input())

posi = [n,0,0,0,0,0]

it = 0
while True:
	for i in range(1,6):
		j = 5 - i
		if posi[j] >= inputs[j]:
			posi[j] = posi[j] - inputs[j]
			posi[j+1] = posi[j+1] + inputs[j]
		else:
			posi[j+1] = posi[j+1] + posi[j]
			posi[j] = 0
	#print(posi)
	it = it + 1
	if posi[5] == n:
		break
print(it)

### FIXED CODE ###

n = int(input())
inputs = [0,0,0,0,0]
inputs[0] = int(input())

inputs[1] = int(input())

inputs[2] = int(input())

inputs[3] = int(input())

inputs[4] = int(input())

posi = [n,0,0,0,0,0]

min = inputs[0]

for inp in inputs:
	if min > inp:
		min = inp

nn = int(n / min)
if nn != 0:
	if n % min != 0:
		nn += 1
	nn = nn -1

nn = 5 + nn

print(nn)
### BUGGY CODE ###

def ex(x):
    res = 0
    for i in range(1, x+1):
        res += i/x
    return res

n, k = map(int, input().split())
lst = list(map(int, input().split()))
exlst = [ex(l) for l in lst]
maxmum = -1
for i in range(n-k+1):
    val = sum(exlst[i:i+k])
    if val > maxmum:
        maxmum = val
print(maxmum)

### FIXED CODE ###

def ex(x):
    return (x+1)/2
 
n, k = map(int, input().split())
lst = list(map(int, input().split()))
source = [ex(i) for i in range(1, 1001)]
exlst = [source[l-1] for l in lst]
maxmum = -1

cumulative = [0]
total = 0
for ex in exlst:
    total += ex
    cumulative.append(total)

maxmum = -1
for i in range(n-k+1):
    sum_ = cumulative[i+k] - cumulative[i]
    if sum_ > maxmum:
        maxmum = sum_
print(maxmum)
### BUGGY CODE ###

n = int(input())
s = input()
a = "SS"
b = "SW"
c = "WS"
d = "WW"

#ox
ans = "-1"

for animals in [a,b,c,d]:
    for say in s:
        if (animals[-1] == "S" and say == "o" ) or (animals[-1] == "W" and say == "x"):
            animals += animals[-2]
        elif (animals[-1] == "S" and say == "x"):
            if animals[-2] == "S":
                animals += "W"
            else:
                animals += "S"
        elif (animals[-1] == "W" and say == "o"):
            if animals[-2] == "S":
                animals += "W"
            else:
                animals += "S"
    if animals[:2] == animals[-2:]:
        ans  =animals[1:-1]
print(ans)


### FIXED CODE ###

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

#ox
ans = "-1"

for animals in ["SS","SW","WS","WW"]:
    for say in s:
        if (animals[-1] == "S" and say == "o" ) or (animals[-1] == "W" and say == "x"):
            animals += animals[-2]
        elif (animals[-1] == "S" and say == "x"):
            if animals[-2] == "S":
                animals += "W"
            else:
                animals += "S"
        elif (animals[-1] == "W" and say == "o"):
            if animals[-2] == "S":
                animals += "W"
            else:
                animals += "S"
    if animals[:2] == animals[-2:]:
        ans  =animals[1:-1]
print(ans)
### BUGGY CODE ###

s = input()
mod = 2019
dic = [0] * mod
dic[0] += 1

tmp = 0
for i in reversed(range(len(s))):
    tmp += int(s[i]) * (10 ** (len(s)-1-i))
    tmp %= mod
    dic[tmp] += 1

ans = [i * (i-1) / 2 for i in dic]
print(int(sum(ans)))

### FIXED CODE ###

s = input()
mod = 2019
dic = [0] * mod
dic[0] += 1

tmp = 0
d = 1
for i in reversed(range(len(s))):
    tmp += int(s[i]) * d
    tmp %= mod
    d *= 10
    d %= mod
    dic[tmp] += 1

ans = [i * (i-1) / 2 for i in dic]
print(int(sum(ans)))
### BUGGY CODE ###

nk = input().split()
n = int(nk[0])
k = int(nk[1])
a = list(map(int, input().split()))

p = [0] * n
for i in range(k - 1, n):
    if i == k - 1:
        p_i = 1
        for j in range(k):
            p_i *= a[i - j]
        p[i] = p_i
    else:
        p[i] = int(p[i - 1] / a[i - k] * a[i])
        if p[i] > p[i - 1]:
            print("Yes")
        else:
            print("No")

### FIXED CODE ###

nk = input().split()
n = int(nk[0])
k = int(nk[1])
a = list(map(int, input().split()))

for i in range(k, n):
    if a[i] > a[i - k]:
        print("Yes")
    else:
        print("No")
### BUGGY CODE ###

N=int(input())
*H,=map(int,input().split())
L=len(H)

ans=False
cnt=0
while ans==False:
    cnt+=1
    m=max(H)
    for i in range(H.index(m), L):
        if H[i]==m:
            H[i]-=1
        else:
            break
    if sum(H)==0: ans=True
print(cnt)

### FIXED CODE ###

N=int(input())
*H,=map(int,input().split())
L=len(H)

cnt=0
prv=0

for i in range(N):
    if  prv < H[i]:
        cnt+=H[i]-prv
    prv=H[i]
print(cnt)
### BUGGY CODE ###

d=dict()
for i in range(int(input())):
    s=input()
    if s not in d:
        d[s]=1
    else:
        d[s]+=1
max_v = max(d.values())
print(*sorted([kv[0] for kv in d.items() if kv[1] == max(d.values())]))

### FIXED CODE ###

d=dict()
for i in range(int(input())):
    s=input()
    if s not in d:
        d[s]=1
    else:
        d[s]+=1
max_v = max(d.values())
print(*sorted([kv[0] for kv in d.items() if kv[1] == max_v]))
### BUGGY CODE ###

# -*- coding utf-8 -*-
n, k = map(int, input().split())
while n >= k:
    n = n - k

x = -1*(n-k)
if n<x:
    print(n)
else:
    print(x)


### FIXED CODE ###

# -*- coding utf-8 -*-
n, k = map(int, input().split())
if k==1:
    print(0)
    exit()
n = n%k
if n <=k/2:
    print(n)
else:
    print(-1*(n-k))
### BUGGY CODE ###

# import numpy as np
from collections import deque

H,W=map(int,input().split())
CH,CW=map(int,input().split())
DH,DW=map(int,input().split())

S=[input() for _ in range(H)]
# 後の条件分岐を簡略化するためワープしても迷路外に出ないように壁で囲む
S = ['##{}##'.format(row) for row in S]
S.insert(0, '##{}##'.format('#' * W))
S.insert(0, '##{}##'.format('#' * W))
S.append('##{}##'.format('#' * W))
S.append('##{}##'.format('#' * W))


MAX_COST = 10 ** 9
Cost=[ [ MAX_COST for _ in range(W+4)] for _ in range(H+4)]
# Cost = np.full((H,W),MAX_COST)

# print(S)

ans = -1

cost0 = deque()

cost0.append((CH+1,CW+1,0))
Cost[CH+1][CW+1] = 0;

# used = set()
walk=[(1,0),(0,1),(-1,0),(0,-1)]
warp = [ (i,j) for i in range(-2,3) for j in range(-2,3) if (i, j) not in [(0, 0)] + walk ]
# print(warp)

cost1 = deque()

while 0 < len(cost0):
	h,w,c=cost0.popleft()
	cost1.append((h,w,c))

	for i,j in walk:
		dh = h+i
		dw = w+j
		if S[dh][dw] == '.' and c < Cost[dh][dw]:
			Cost[dh][dw] = c
			# print("updl ", i,j,dh,dw,c)
			cost0.append((dh,dw,Cost[dh][dw]))

	if len(cost0) == 0:

		while 0 < len(cost1):
			h,w,c=cost1.popleft()
			# print(h,w,c)
			for i,j in warp:
				dh = h+i
				dw = w+j
				# print(i,j)
				if S[dh][dw] == '.':
					if c + 1 < Cost[dh][dw]:
						Cost[dh][dw] = c + 1
						cost0.append((dh,dw,Cost[dh][dw]))


if Cost[DH+1][DW+1] == MAX_COST:
	print(-1)
else:
	print(Cost[DH+1][DW+1])

### FIXED CODE ###

from collections import deque

H,W=map(int,input().split())
CH,CW=map(int,input().split())
DH,DW=map(int,input().split())

S=[list(input()) for _ in range(H)]
MAX_COST = 10 ** 9
Cost=[ [ MAX_COST for _ in range(W)] for _ in range(H)]

# print(S)

ans = -1

deq = deque()

deq.append((CH-1,CW-1,0))
Cost[CH-1][CW-1] = 0;

walk=[(1,0),(0,1),(-1,0),(0,-1)]

# used = set()

while 0 < len(deq):
	h,w,c=deq.popleft()
	# print(h,w,c)
	for i,j in walk:
		if 0 <= h+i and h+i < H and 0 <= w+j and w+j < W:
			if S[h+i][w+j] == '.' and c < Cost[h+i][w+j]:
				Cost[h+i][w+j] = c
				# print("updl ", i,j,h+i,w+j,c)
				deq.appendleft((h+i,w+j,Cost[h+i][w+j]))
	for i in range(-2,3,1):
		for j in range(-2,3,1):
			# print(i,j)
			if 0 <= h+i and h+i < H and 0 <= w+j and w+j < W:
				if S[h+i][w+j] == '.':
					if c + 1 < Cost[h+i][w+j]:
						Cost[h+i][w+j] = c + 1
						deq.append((h+i,w+j,Cost[h+i][w+j]))
						# print("updr ", h+i,w+j,Cost[h+i][w+j])

if Cost[DH-1][DW-1] == MAX_COST:
	print(-1)
else:
	print(Cost[DH-1][DW-1])
### BUGGY CODE ###

# coding: utf-8

N, M = (int(x) for x in input().split())

pass_ids = [True] * N
for i in range(M):
	L, R = (int(x) - 1 for x in input().split())
	for j in range(L):
		pass_ids[j] = False
	for j in range(R + 1, N):
		pass_ids[j] = False

print(pass_ids.count(True))

### FIXED CODE ###

# coding: utf-8

N, M = (int(x) for x in input().split())

pass_ids = [x for x in range(N)]

L_max, R_min = 0, N
for i in range(M):
	L, R = (int(x) - 1 for x in input().split())
	
	if L_max < L:
		L_max = L
	if R_min > R:
		R_min = R


if L_max < R_min + 1:
	print(len(list(range(L_max, R_min + 1))))
else:
	print("0")
### BUGGY CODE ###

s1 = input()
s2 = input()
arra = ["-"]
arrb = ["-"]
for i in s1:
    arra.append(i)
for i in s2:
    arrb.append(i)
n1 = len(s1)
n2 = len(s2)
temparr = ["" for i in range(n2 + 1)]
dp = [temparr[::] for i in range(n1 + 1)]

for i in range(1, n1 + 1):
    for j in range(1 , n2 + 1):
        #print("i " + str(i) + " j " + str(j))
        if arra[i] != arrb[j]:
            dig = dp[i -1][j-1]
            upp = dp[i - 1][j]
            left = dp[i][j - 1]
            dign = len(dig)
            uppn = len(upp)
            leftn = len(left)
            if dign >= uppn and dign >= leftn:
                dp[i][j] = dig 
            elif uppn >= dign and uppn >= leftn:
                dp[i][j] = upp
            else:
                dp[i][j] = left
        else:
            dig = dp[i -1][j-1] + arra[i]
            upp = dp[i - 1][j]
            left = dp[i][j - 1]
            dign = len(dig)
            uppn = len(upp)
            leftn = len(left)
            if dign >= uppn and dign >= leftn:
                dp[i][j] = dig 
            elif uppn >= dign and uppn >= leftn:
                dp[i][j] = upp
            else:
                dp[i][j] = left

# for i in dp:
#     print(i) 
print(dp[-1][-1])
   
        
        

### FIXED CODE ###

s1 = input()
s2 = input()
arra = ["-"]
arrb = ["-"]
for i in s1:
    arra.append(i)
for i in s2:
    arrb.append(i)
n1 = len(s1)
n2 = len(s2)
temparr = [0 for i in range(n2 + 1)]
dp = [temparr[::] for i in range(n1 + 1)]

for i in range(1, n1 + 1):
    for j in range(1 , n2 + 1):
        if arra[i] != arrb[j]:
            dig = dp[i -1][j-1]
            upp = dp[i - 1][j]
            left = dp[i][j - 1]
            dign = dig
            uppn = upp
            leftn = left
            if dign >= uppn and dign >= leftn:
                dp[i][j] = dig
            elif uppn >= dign and uppn >= leftn:
                dp[i][j] = upp
            else:
                dp[i][j] = left
        else:
            dig = dp[i -1][j-1]
            upp = dp[i - 1][j]
            left = dp[i][j - 1]
            dig = dig + 1
            #print(dig)
            
            dign = dig
            uppn = upp
            leftn = left
            if dign >= uppn and dign >= leftn:
                dp[i][j] = dig
            elif uppn >= dign and uppn >= leftn:
                dp[i][j] = upp
            else:
                dp[i][j] = left

# for i in dp:
#     print(i) 
ans = ""

while n2 != 0 and n1 != 0 :
    
    if arra[n1] == arrb[n2]:
        ans += arra[n1]
        n2 -= 1 
        n1 -= 1 
        continue 
    else:
        if dp[n1 - 1][n2] >= dp[n1][n2 - 1]:
            n1 -= 1 
        else:
            n2 -=1 
print(ans[::-1])
### BUGGY CODE ###

from itertools import combinations
n=int(input())
l=list(map(int, input().split()))
combl=list(combinations(l,3))
combl.append(0)
count=0
i=0
while combl[i]!=0:
	if combl[i][0]<combl[i][1]+combl[i][2] and combl[i][1]<combl[i][2]+combl[i][0] and combl[i][2]<combl[i][0]+combl[i][1]:
		count+=1
	i+=1
print(count)

### FIXED CODE ###

import bisect
n=int(input())
l=list(map(int, input().split()))
l.sort()

count=0
for i in range(n-2):
	for j in range(i+1,n-1):
		maxk=bisect.bisect_left(l,l[i]+l[j],j+1,n)-1
		count+=maxk-j
print(count)
### BUGGY CODE ###

N,K = map(int, input().split())
A = list(map(int, input().split()))
def prod(X,Y):
    Z = 0
    while Y > 0:
        if Y % 2 == 1:
            Z += X
        X <<= 1
        Y >>= 1
    return Z 
M = 1
for i in range (0,K):
    M = prod(M, A[i])
while True:
    def prod(X,Y):
        Z = 0
        while Y > 0:
            if Y % 2 == 1:
                Z += X
            X <<= 1
            Y >>= 1
        return Z 
    A.pop(0)
    if len(A) == K - 1:
        break
    P = 1
    for i in range (K):
        P = prod(P, A[i])
    print('Yes' if P > M else 'No')
    M = P

### FIXED CODE ###

N,K = map(int, input().split())
A = list(map(int, input().split()))
for i in range (K,N):
    print('Yes' if A[i] > A[i-K] else 'No')
### BUGGY CODE ###

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

if N%2==1:
    A.append(A[-1])

def gcd(a,b):
    while b!=0:
        a,b = b,a%b
    return a

P=[]
for i in range(len(A)//2):
    P.append(gcd(A[2*i],A[2*i+1]))

ans=1
for i in range(1,min(P)+1):
    g=1
    for j in range(len(P)):
        if P[j]%i!=0:
            g-=1
            break
    if g==1:
        ans=i

print(ans)

### FIXED CODE ###

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

def gcd_list(L):
    b=min(L)
    for i in L:
        while True:
            if i%b==0:
                break
            c=b
            b=i%b
            i=c
    return(b)

print(gcd_list(A))
### BUGGY CODE ###

while(1):
    try:
        print sum(map(int, raw_input().split()))
    except EOFError:
        exit

### FIXED CODE ###

while True:
    try:
        print sum(map(int, raw_input().split()))
    except EOFError:
        break
### BUGGY CODE ###

N = int(input())
A = [int(i) for i in input().split()]
a = A.count
cnt = 0
for i in set(A):
  if i < a(i):
    cnt += a(i)-i
  elif i > a(i):
    cnt += a(i)
print(cnt)

### FIXED CODE ###

N = int(input())
A = sorted(int(i) for i in input().split())+[0]
cnt, ans = 0, 0
a = A[0]
for i in range(len(A)):
  if a == A[i]:
    cnt += 1
  elif a != A[i]:
    if cnt < a:
      ans += cnt
    elif cnt > a:
      ans += cnt-a
    a = A[i]
    cnt = 1
print(ans)
### BUGGY CODE ###

n,m = map(int, input().split())
a = [0] * m
b = [0] * m
for i in range(m):
    a[i],b[i] = map(int,input().split())
c = []
d = []
for i in range(m):
    
    if a[i] == 1:
        c.append(b[i])
    if b[i] == n:
        d.append(a[i])
ans = False
c = list(set(c))
for i in c:
    if d.count(i) >=1:
        ans = True
        break
if ans:
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')

### FIXED CODE ###

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

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

go = []
goal = []

for i in range(len(a)):
    if a[i] == 1:
        go.append(b[i])
    if b[i] == n:
        goal.append(a[i])

count = [0 for i in range(n)]
for i in range(len(go)):
    count[go[i]-1] = 1
for i in range(len(goal)):
    count[goal[i]-1] += 1
for i in range(len(count)):
    if count[i] > 1:
        print("POSSIBLE")
        exit()
print("IMPOSSIBLE")