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

import sys
from collections import defaultdict
import collections

sys.setrecursionlimit(1000000)

class UnionFindPathCompression():
    def __init__(self, n):
        self.parents = list(range(n))

    def find(self, x):
        if self.parents[x] == x:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        self.parents[y] = x


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

for i in range(M):
    A, B = map(int, input().split())
    uf.union(A - 1, B - 1)

hoge = [uf.find(i) for i in range(N)]

#print(hoge)
hogehoge = collections.Counter(hoge).most_common()

print(hogehoge[0][1])


### FIXED CODE ###

import sys
from collections import defaultdict
import collections

sys.setrecursionlimit(1000000)

class UnionFindPathCompression():
    def __init__(self, n):
        self.parents = list(range(n))

    def find(self, x):
        if self.parents[x] == x:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        self.parents[y] = x


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

for i in range(M):
    A, B = map(int, input().split())
    uf.union(A - 1, B - 1)

hoge = [uf.find(i) for i in range(N)]

#print(hoge)
hogehoge = collections.Counter(hoge).most_common()

print(hogehoge[0][1])
### BUGGY CODE ###

import collections

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

a.sort()
def Eratosthenes(x):
    c = collections.Counter(x)
    cnt = 0
    nmax = x[-1]
    is_prime = [True] * (nmax+1)
    for i in range(1, nmax+1):
        if not is_prime[i]:
            continue
        if i in x:
            for j in range(i*2, nmax+1, i):
                is_prime[j] = False
    for i in x:
        if c[i] > 1:
            continue
        if is_prime[i] == True:
            cnt += 1
    print(cnt)

Eratosthenes(a)

### FIXED CODE ###

from collections import Counter

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

a.sort()
cnt = 0
nmax = a[-1]
table = [True] * (nmax+1)
c = Counter(a)

duplicate = []
for i in c.keys():
    if c[i] > 1:
        duplicate.append(i)
for i in a:
    if not table[i]:
        continue
    if not i in duplicate:
        cnt += 1
    for j in range(i*2, nmax+1, i):
        table[j] = False
print(cnt)
### BUGGY CODE ###

N = int(input())
A = list(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 ###

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

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

def popcount(n):
    cnt = 0
    for i in range(n):
        if ((n >> i) & 1):
            cnt +=1
    return cnt

def f(n):
    cnt = 0
    while True:
        if n == 0:
            break
        n = n % popcount(n)
        cnt += 1
    return cnt

def pow_r(x, n):
    if n == 0:
        return 1
    if n % 2 == 0:
        return pow_r(x ** 2, n // 2)
    else:
        return x * pow_r(x ** 2, (n - 1) // 2)

if __name__ == "__main__":
    n = int(input())
    x = input()
    xList = list(x)
    k = len(xList) - 1
    for i in range(n):
        xList[i] = str(int(xList[i]) ^ 1)
        xNum = int("".join(xList), 2)
        print(f(xNum))
        xList[i] = str(int(xList[i]) ^ 1)


### FIXED CODE ###

def f(n):
    cnt = 1
    while n > 0:
        n  %= bin(n).count('1')
        cnt += 1
    return cnt

if __name__ == "__main__":
    n = int(input())
    x = input()
    d = x.count('1')
    if d == 1:
        for i in x[:-1]:
            if i == '0':
                print(1)
            else:
                print(0)
        if x[-1] == '1':
            print(0)
        else:
            print(2)
        exit()

    ans = []
    M = 0
    for i in x:
        M <<= 1
        if i == '1':
            M += 1
    p = M % (d + 1)
    m = M % (d - 1)
    for i in range(n):
        if x[i] == '0':
            ans.append(f((p + pow(2, n - i - 1, d + 1)) % (d + 1)))
        else:
            ans.append(f((m - pow(2, n - i - 1, d - 1)) % (d - 1)))
    print(*ans, sep='\n')
### BUGGY CODE ###

import numpy as np
N = int(input())
As = np.array(list(map(int, input().split())))
a,b = [0]*N,[0]*N
for i in range(N):
  c = np.sum(As==(i+1))
  a[i] = c*(c-1)//2
  b[i] = (c-1)*(c-2)//2
d = sum(a)
for i in As: print(d-a[i-1]+b[i-1])

### FIXED CODE ###

N = int(input())
As = list(map(int, input().split()))
a,b,c = [0]*N,[0]*N,[0]*N
for i in As:
  a[i-1] += 1
  b[i-1] = a[i-1]*(a[i-1]-1)//2
  c[i-1] = (a[i-1]-1)*(a[i-1]-2)//2

d = sum(b)
print("\n".join([str(d-b[i-1]+c[i-1]) for i in As]))
### BUGGY CODE ###

import sys
#DEBUG=True
DEBUG=False
if DEBUG:
    f=open("202006_5th/D_input.txt")
else:
    f=sys.stdin
def get_dividor(num):
    ans=0
    for _ in range(1,num+1):
        if _**2>num:
            break
        if num%_==0:
            ans+=1
            if (_**2)!=num:
                ans+=1
    return ans
n=int(f.readline().strip())
ans_sum=0
for _ in range(1,n+1):
    ans_sum+=_*get_dividor(_)
print(ans_sum)

### FIXED CODE ###

import sys
#DEBUG=True
DEBUG=False
if DEBUG:
    f=open("202006_5th/D_input.txt")
else:
    f=sys.stdin
ans_sum=0
n=int(f.readline().strip())
for _ in range(1,n+1):
    num=n//_
    ans_sum+=_*((num*(num+1))//2)
print(ans_sum)
### BUGGY CODE ###

def quest_d():
    N = int(input())
    S = input()

    i = 0
    sum = 0
    while i < len(S):
        a = S[i]
        j = i
        while j < len(S) - 1:
            j += 1
            if S[j] == a:
                continue

            l = 2 * j - i
            b = S[j]
            k = j
            while k < len(S)- 1:
                k += 1
                if S[k] == a or S[k] == b or l == k:
                    continue
                sum += 1
        i += 1
    print(sum)

if __name__ == '__main__':
    quest_d()

### FIXED CODE ###

def combi_three(n):
    if n < 3:
        return 0
    else:
        return int((n * (n - 1) * (n - 2)) / 6)

def quest_d():
    N = int(input())
    S = input()

    index_dict = {'R':0, 'G':0, 'B':0 }
    for index in range(N):
        index_dict[S[index]] = index_dict[S[index]] + 1

    if index_dict['R'] * index_dict['G'] * index_dict['B'] == 0:
        print(0)
        return

    rrr = combi_three(index_dict['R'])
    ggg = combi_three(index_dict['G'])
    bbb = combi_three(index_dict['B'])
    rrg = combi_three(index_dict['R'] + index_dict['G'])
    ggb = combi_three(index_dict['G'] + index_dict['B'])
    bbr = combi_three(index_dict['B'] + index_dict['R'])

    i = 0
    sum = 0
    while i < N:
        a = S[i]
        j = i
        while j < N - 1:
            j += 1
            if S[j] == a:
                continue

            k = 2 * j - i
            if k < N:
                b = S[j]
                if S[k] != a and S[k] != b:
                    sum += 1
        i += 1
    print(combi_three(N) - sum - rrg - bbr - ggb + rrr + ggg + bbb)

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

n = int(input())

arr = []
for i in range(n):
    x = int(input())
    if x in arr:
        arr.remove(x)
    else:
        arr.append(x)


print(len(arr))


### FIXED CODE ###

import collections

n = int(input())
a = [int(input()) for _ in range(n)]
b = collections.Counter(a)

cnt = 0
for v in b.values():
    if v % 2 == 1:
        cnt += 1

print(cnt)
### BUGGY CODE ###

n, m = map(int, input().split())
answer = 0
ans = []
pen = []
penal = 0
p = [0]*m
x = [0]*m
for i in range(m):
    p[i], x[i] = map(str, input().split())
    if x[i] == "AC":
        if p[i] not in ans:
            ans.append(p[i])
            answer += 1
    elif x[i] == "WA":
        for j in range(len(ans)):
            if p[i] == ans[j]:
                penal -= 1
                break
        penal += 1
        pen.append((p[i], x[i]))
    if answer == n:
        break

for i in range(len(pen)):
    if pen[i][0] not in ans:
        penal -= 1


print("{}".format(answer) + " {}".format(penal))

### FIXED CODE ###

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

problem = [0] * n
count = [0] * n

penal = 0

for i in range(m):
    p, x = map(str, input().split())
    p = int(p) - 1
    if x == "AC":
        if problem[p] == 0:
            problem[p] = 1
    elif x == "WA":
        if problem[p] == 0:
            count[p] += 1

for i in range(n):
    if problem[i] == 0:
        count[i] = 0

print("{}".format(sum(problem)) + " {}".format(sum(count)))
### BUGGY CODE ###

from sys import stdin
from collections import deque, Counter, defaultdict
from fractions import gcd
import heapq

INF = int(1e10)
MOD = int(1e9 + 7)

def power(n, r, mod):
    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 input():
    return stdin.readline()[:-1]

def main():
    from builtins import int, map
    n = int(input())
    count = 0
    A, B = [], []
    # mp = defaultdict(lambda: [0, 0])
    mp = {}
    for i in range(n):
        ai, bi = map(int, input().split())
        if ai == 0 and bi == 0:
            count += 1
            continue

        gi = gcd(ai, bi)
        ai = ai // gi
        bi = bi // gi

        if bi < 0:
            ai = -ai
            bi = -bi
        if bi == 0 and ai < 0:
            ai = -ai
        if ai <= 0:
            ai, bi = bi, -ai
            if (ai, bi) in mp:
                mp[(ai, bi)][0] += 1
            else:
                mp[(ai, bi)] = [1, 0]
        else:
            if (ai, bi) in mp:
                mp[(ai, bi)][1] += 1
            else:
                mp[(ai, bi)] = [0, 1]

    ans = 1
    for key in mp:
        s, t = mp[key]
        ans *= pow(2, s, MOD) + pow(2, t, MOD) - 1
        ans %= MOD
    ans -= 1
    ans += count
    ans %= MOD
    print(ans)

if __name__ == '__main__':
    main()

### FIXED CODE ###

from sys import stdin
from collections import deque, Counter, defaultdict
# from fractions import gcd
from math import gcd
import heapq

MOD = 10 ** 9 + 7
input = stdin.readline

n = int(input())
zero = 0
A, B = [], []
# mp = defaultdict(lambda: [0, 0])
mp = {}
for i in range(n):
    ai, bi = map(int, input().split())
    if ai == 0 and bi == 0:
        zero += 1
        continue

    gi = gcd(ai, bi)
    ai = ai // gi
    bi = bi // gi

    if bi < 0:
        ai = -ai
        bi = -bi
    if bi == 0 and ai < 0:
        ai = -ai
    if ai <= 0:
        ai, bi = bi, -ai
        if (ai, bi) in mp:
            mp[(ai, bi)][0] += 1
        else:
            mp[(ai, bi)] = [1, 0]
    else:
        if (ai, bi) in mp:
            mp[(ai, bi)][1] += 1
        else:
            mp[(ai, bi)] = [0, 1]

ans = 1
for key in mp:
    s, t = mp[key]
    ans *= pow(2, s, MOD) + pow(2, t, MOD) - 1
    ans %= MOD
print((zero - 1 + ans) % MOD)
### BUGGY CODE ###

from collections import *

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

x-=1
y-=1

tree=[[] for i in range(n)]
for i in range(n-1):
  tree[i].append(i+1)
  tree[i+1].append(i)
tree[x].append(y)
tree[y].append(x)

ans=[]
for i in range(n):
  dist=[-1 for i in range(n)]
  dist[i]=0

  que=deque()
  que.append(i)

  while que:
    p=que.popleft()
    for j in tree[p]:
      if dist[j]==-1:
        que.append(j)
        dist[j]=dist[p]+1
      else:
        continue
  ans+=dist

c=Counter(ans)
for i in range(1,n):
  print(c[i]//2)

### FIXED CODE ###

from collections import Counter

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

x-=1
y-=1

dist=[]
for i in range(n-1):
  for j in range(i+1,n):
    dist.append(min(j-i,abs(i-x)+1+abs(j-y)))

c=Counter(dist)
for i in range(1,n):
  print(c[i])
### BUGGY CODE ###

n = int(input())
a = []
b = []
for i in range(n):
    t, m = map(int, input().split())
    a.append(t)
    b.append(m)
ans = 0
for i in range(n):
    while (ans + a[-1 - i]) % b[-1 - i] != 0:
        ans += 1
print(ans)


### FIXED CODE ###

n = int(input())
a = []
b = []
for i in range(n):
    t, m = map(int, input().split())
    a.append(t)
    b.append(m)
ans = 0
for i in range(n):
    if((ans + a[-1 - i]) % b[-1 - i]!=0):
        ans += b[-1 - i] - (ans + a[-1 - i]) % b[-1 - i]
print(ans)
### BUGGY CODE ###

import math
N = int(input())
A = int(math.sqrt(N))
for i in range(A, N + 1):
    if N % i == 0:
        print(len(str(i)))
        break


### FIXED CODE ###

import math
N = int(input())
for i in range(int(math.sqrt(N)) + 1, 0, -1):
    q, m = divmod(N, i)
    if m == 0:
        print(len(str(q)))
        break
### BUGGY CODE ###

from collections import deque
import bisect

class BIT:
    def __init__(self, n, d = None):
        self.n = n
        self.bit = [0] * (n + 1)
        if d == None:
            return
        for i in range(n):
            self.update(i, d[i])

    #値更新
    def update(self, i, x = 1):
        i += 1
        while i <= self.n:
            self.bit[i] += x
            i += (i & -i)

    #区間合計値を出力            
    def query(self, i):
        i += 1
        res_sum = 0
        while i > 0:
            res_sum += self.bit[i]
            i -= i & -i
        return res_sum

N, D, A = list(map(int, input().split()))
pair_xh = [[-1, -1] for _ in range(N)] # 1回ずつしか使わないけどソートするから必要
for i in range(N):
    pair_xh[i][0], pair_xh[i][1] = list(map(int, input().split()))
pair_xh.sort(key = lambda x: x[0]) #座標でソート
 
# q_lim_d = deque() # 累積和に含まれる攻撃範囲とダメージを保存する場所
# total = 0 # 喰らいダメージの累積和
count = 0 # 攻撃回数
bit = BIT(N + 1)

for i in range(N):
    x = pair_xh[i][0]
    h = pair_xh[i][1]
    
    # while len(q_lim_d) and q_lim_d[-1][0] < x: # 範囲外になったら喰らわないから累積和から外す
    #     total -= q_lim_d[-1][1]
    #     q_lim_d.pop()
    # h -= total
    h -= bit.query(i)
    if h > 0: # 見てる敵の体力が0になる攻撃回数を求めその分を累積和に足す
        times = (h + A - 1) // A # 0にするのに必要な回数(切り上げ)
        count += times
        damage = A * times
        # total += damage
        # q_lim_d.appendleft([x + 2 * D, damage])
        bit.update(i, damage)
        rx = x + D * 2
        j = bisect.bisect_right(pair_xh, [rx + 1, -1])
        bit.update(j, -damage)
print(count)

### FIXED CODE ###

from collections import deque
N, D, A = list(map(int, input().split()))
pair_xh = [[-1, -1] for _ in range(N)] # 1回ずつしか使わないけどソートするから必要
for i in range(N):
    pair_xh[i][0], pair_xh[i][1] = list(map(int, input().split()))
pair_xh.sort(key = lambda x: x[0]) #座標でソート

q_lim_d = deque() # 累積和に含まれる攻撃範囲とダメージを保存する場所
total = 0 # 喰らいダメージの累積和
count = 0 # 攻撃回数
for i in range(N):
    x = pair_xh[i][0]
    h = pair_xh[i][1]
    
    while len(q_lim_d) and q_lim_d[-1][0] < x: # 範囲外になったら喰らわないから累積和から外す
        total -= q_lim_d[-1][1]
        q_lim_d.pop()
    h -= total
    if h > 0: # 見てる敵の体力が0になる攻撃回数を求めその分を累積和に足す
        times = (h + A - 1) // A # 0にするのに必要な回数(切り上げ)
        count += times
        damage = A * times
        total += damage
        q_lim_d.appendleft([x + 2 * D, damage])
print(count)
### BUGGY CODE ###

s = input()
q = int(input())
for _ in range(q):
    query = list(input().split())
    if int(query[0]) == 1:
        s = s[::-1]
    else:
        if int(query[1]) == 1:
            s = query[2] + s
        else:
            s = s + query[2]
print (s)

### FIXED CODE ###

from collections import deque
d = deque(input())
q = int(input())
reverse = False
for _ in range(q):
    query = list(input().split())
    if query[0] == '1':
        if reverse:
            reverse = False
        else:
            reverse = True
        continue
    else:
        if query[1] == '1':
            if reverse:
                d.append(query[2])
            else:
                d.appendleft(query[2])
        else:
            if reverse:
                d.appendleft(query[2])
            else:
                d.append(query[2])

if reverse:
    d = list(reversed(d))

print(''.join(map(str, d)))
### BUGGY CODE ###

def WalkingTakahashi():
    
    data = list(map(int,input().split()))
    
    position = data[0]
    
    if data[0] == data[2] and data[1]%2 == 0:
        print(data[2])
    
    elif data[0] == data[2] and data[1]%2 == 1:
        print(0)
        
    else:
        for i in range(data[1]):
            
            if abs(position + data[2]) < abs(position - data[2]):
                position = position + data[2]
                
            else:
                position = position - data[2]
                
        print(abs(position))
        
if __name__ == '__main__':
    WalkingTakahashi()




### FIXED CODE ###

def WalkingTakahashi():
    
    data = list(map(int,input().split()))
    
    position = abs(data[0])
    
    m = min(data[1], position//data[2])
    
    position = position - data[2]*m
    
    data[1] = data[1] - m
    
    data[1] %= 2
    
    position = position - data[2]*data[1]
    
    print(abs(position))
    
if __name__ == '__main__':
    WalkingTakahashi()
### BUGGY CODE ###

from collections import deque

INF = 114514191981036436433-4
h,w = map(int,input().split())

c = [[] for _ in range(h)]
for i in range(h):
    c[i] = input()
            
dx = [1,0,-1,0]
dy = [0,1,0,-1]

ans = 0
for i in range(h):
    for j in range(w):
        for l in range(h):
            for m in range(w):
                if c[i][j] == "#" or c[l][m] == "#":
                    continue
                if i == l and j == m:
                    continue
                    
                d = [[INF for i in range(w)] for j in range(h)]
                
                sx,sy = j,i
                gx,gy = m,l
                
                d[sy][sx] = 0
                que = deque([[sy,sx]])

                while que:
                    y,x = que.popleft()

                    for k in range(4):
                        nx = x + dx[k]
                        ny = y + dy[k]

                        if 0<=nx and nx<w and 0<=ny and ny<h and c[y][x] != '#':
                            if d[ny][nx] > d[y][x] + 1:
                                d[ny][nx]=d[y][x] + 1
                                que.append([ny,nx])
                                
                if d[gy][gx] != INF:         
                    ans = max(d[gy][gx],ans)

print(ans)

### FIXED CODE ###

from collections import deque

h,w = map(int,input().split())
INF = 114514191981036436433-4

c = [None]*h
for i in range(h):
    c[i] = input()
            
dx = [1,0,-1,0]
dy = [0,1,0,-1]

ans = 0
for i in range(h):
    for j in range(w):
        if c[i][j] == "#":
            continue
        
        d = [[INF for i in range(w)] for j in range(h)]
        e = [[0 for i in range(w)] for j in range(h)]

        dx = [1,0,-1,0]
        dy = [0,1,0,-1]

        d[i][j] = 0
        que = deque([[i,j]])

        while que:
            y,x = que.popleft()

            for k in range(4):
                nx = x + dx[k]
                ny = y + dy[k]

                if 0<=nx and nx<w and 0<=ny and ny<h and c[ny][nx] != '#':
                    if d[ny][nx] > d[y][x]+1:
                        d[ny][nx]=d[y][x]+1
                        e[ny][nx] = d[ny][nx]
                        que.append([ny,nx])
                        
        tmax = 0
        for l in range(h):
            tmax = max(tmax,max(e[l]))
        ans = max(ans,tmax)
        
print(ans)
### BUGGY CODE ###

k,s = map(int,input().split())
ans = 0
for x in range(k+1):
    for y in range(k+1):
        for z in range(k+1):
            if x + y + z == s:
                ans += 1
print(ans)

### FIXED CODE ###

k,s = map(int,input().split())
ans = 0
for x in range(k+1):
    for y in range(k+1):
        if 0 <= s - x - y <= k:
                ans += 1
print(ans)
### BUGGY CODE ###

from functools import reduce 
from operator import mul
N = int(input())
A = list(map(int,input().split()))

ans = reduce(mul,A)
lim = 10 ** 18
if ans > lim:
  print(-1)
else:
  print(ans)

### FIXED CODE ###

from functools import reduce 
from operator import mul
N = int(input())
A = sorted(list(map(int,input().split())),reverse = True)

lim = 10 ** 18
ans = 1

if A[-1] == 0:
  print(0)
else:
  for i in A:
    ans *= i
    if ans > lim:
      ans = -1
      break
  print(ans)
### BUGGY CODE ###

from collections import deque
s=deque(list(input()))
p=0
for i in range(int(input())):
    a=list(map(str,input().split()))
    if len(a)==1:
        p+=1
    else:
        if p%2:
            if a[1]=="2":
                s.appendleft(a[2])
            else:
                s.append(a[2])
        else:
            if a[1]=="1":
                s.appendleft(a[2])
            else:
                s.append(a[2])
ans=""
if p%2==1:
    while s:
        ans+=s.pop()
else:
    while s:
        ans+=s.popleft()
print(ans)

### FIXED CODE ###

from collections import deque
s=deque(list(input()))
p=0
for i in range(int(input())):
    a=list(map(str,input().split()))
    if len(a)==1:
        p^=1
    else:
        if p%2:
            if a[1]=="2":
                s.appendleft(a[2])
            else:
                s.append(a[2])
        else:
            if a[1]=="1":
                s.appendleft(a[2])
            else:
                s.append(a[2])
ans=""
if p%2==1:
    while s:
        ans+=s.pop()
else:
    while s:
        ans+=s.popleft()
print(ans)
### BUGGY CODE ###

def main():
    import sys
    def input(): return sys.stdin.readline().rstrip()
    k = int(input())
    tmp = 7
    cnt = 0
    if k%2 == 0:
        print(-1)
        return

    while 1:
        tmp %= k
        cnt += 1
        if tmp == 0:
            break
        tmp = 10*tmp%k
        tmp += 7
    print(cnt)



if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    import sys
    def input(): return sys.stdin.readline().rstrip()
    k = int(input())
    tmp = 7
    cnt = 0
    if k%2 == 0 or k%5 == 0:
        print(-1)
        return

    while 1:
        tmp %= k
        cnt += 1
        if tmp == 0:
            break
        tmp = 10*tmp%k
        tmp += 7
    print(cnt)



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

import random

def is_prime(q,k=50):
    if q == 2: return True
    if q < 2 or q&1 == 0: return False
    d = (q-1)>>1
    while d&1 == 0:
        d >>= 1
    for i in range(k):
        a = random.randint(1,q-1)
        t = d
        y = pow(a,t,q)
        while t != q-1 and y != 1 and y != q-1: 
            y = pow(y,2,q)
            t <<= 1
        if y != q-1 and t&1 == 0:
            return False
    return True

n,m=(int(i) for i in input().split(' '))

if n==1:
  print(m)
  exit()
if m//n>1000000:
  for i in range(1,n):
    if m%i==0 and is_prime(m//i) and (i==1 or m//i<n):
      print('1')
      exit()
for i in range(1,m//n+1)[::-1]:
  if i==1:
    print(i)
    break
  if m%i==0 and m//i>=n:
    print(i)
    break


### FIXED CODE ###

import random

def is_prime(q,k=50):
    if q == 2: return True
    if q < 2 or q&1 == 0: return False
    d = (q-1)>>1
    while d&1 == 0:
        d >>= 1
    for i in range(k):
        a = random.randint(1,q-1)
        t = d
        y = pow(a,t,q)
        while t != q-1 and y != 1 and y != q-1: 
            y = pow(y,2,q)
            t <<= 1
        if y != q-1 and t&1 == 0:
            return False
    return True

n,m=(int(i) for i in input().split(' '))
for i in range(1,n):
  if m%i==0 and (is_prime(i) or i==1) and is_prime(m//i) and (i==1 or m//i<n):
    print('1')
    exit()
for i in range(n,m+1):
  if i==m:
    print(1)
    break
  if m%i==0:
    print(m//i)
    break
  if m-i-n>0 and m%(m-i-n)==0 and m//(m-i-n)>n:
    print(m-i-n)
    break
### BUGGY CODE ###

n, k = map(int, input().split())
a = list(map(int, input().split()))
l = []
for i in range(n):
    l.append(a[i])
    if i>=k:
        m = n = 1
        for i in range(k):
            m*=l[i]
            n*=l[i+1]
        if n>m: print('Yes')
        else: print('No')
        l.pop(0)

### FIXED CODE ###

n, k = map(int, input().split())
a = list(map(int, input().split()))
for i in range(n):
    if i>=k:
      if a[i]>a[i-k]: print('Yes')
      else: print('No')