Harryxun/stf_run huggingface dataset:
a,b,c,d = map(int,input().split())
if abs(c-a)<=d or (abs(b-a)<=d and abs(c-b)<=d)
    print("Yes")
else:
    print("No")

### FIXED CODE ###

a,b,c,d = map(int,input().split())
x = abs(b-a)<=d and abs(c-b)<=d
if abs(c-a)<=d or x:
    print("Yes")
else:
    print("No")
n = int(input())

ans = 0
for i in range(1, n+1):
  x = len(i)
  if x%2 == 1:
    ans += 1
    
print(ans)

### FIXED CODE ###

N = int(input())

import math
ans = 0
for i in range(1, N+1, 1):
    order = int(math.log10(i))+1
    if order%2 == 1:
        ans += 1
    else:
        continue

print(ans)
"""
ある街にN人のすぬけ君(すぬけ君1、すぬけ君2、 ...、 すぬけ君N)が住んでいます。

"""
n, k = map(int, input().split())
input_map = {}
for i in range(k):
    d = int(input())
    input = input()
    list = [int(ai) for ai in input ]
    input_map.setdefault(i, list)

cnt = 0
having_list = input_map(k)
for j in having_list:
    cnt += 1

print(cnt)


### FIXED CODE ###

"""
ある街にN人のすぬけ君(すぬけ君1、すぬけ君2、 ...、 すぬけ君N)が住んでいます。

"""
n, k = map(int, input().split())
n_list = list(range(1, n+1))
input_map = {}
for i in range(k):
    d = int(input())
    d_list = [ int(ai) for ai in input().split()]
    for h in d_list:
        if n_list.count(h) == 1:
            n_list.remove(h)

print(len(n_list))
mport sys
def 解():
    input = sys.stdin.readline
    N = int(input())
    dp = [int(_) for  _ in input().split()]
    for _ in range(N-1):
        a,b,c = [int(_) for  _ in input().split()]
        dp = [max(dp[1]+a,dp[2]+a),max(dp[0]+b,dp[2]+b),max(dp[0]+c,dp[1]+c)]
    print(max(dp))
解()


### FIXED CODE ###

import sys
def 解():
    input = sys.stdin.readline
    N = int(input())
    dp = [int(_) for  _ in input().split()]
    for _ in range(N-1):
        a,b,c = [int(_) for  _ in input().split()]
        dp = [max(dp[1]+a,dp[2]+a),max(dp[0]+b,dp[2]+b),max(dp[0]+c,dp[1]+c)]
    print(max(dp))
解()
N = int(input())
x = [0] * N
u = [0] * N
for i in range(N):
    x[i],u[i] = map(int, input().split())


ans = []

btc_1 = 380000.0

for i  in range(N):
    if u[i] == "JPY":
        ans.append(x[i])
    else:
        yen = ((x[i])*(btc_1))
        ans.append(yen)

print(sum(ans))

### FIXED CODE ###

N=int(input())
ans=0
for i in range(N):
    x,u=map(str,input().split())
    x=float(x)
    if u=="JPY":
        ans+=x
    else:
        ans+=380000.0*x
print(ans)
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees#, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7
#from decimal import *

H, W, D = MAP()
A = [LIST() for _ in range(H)]

dic = defaultdict(tuple)

for y in range(H):
	for x in range(W):
		dic[A[y][x]] = (y+1, x+1)

power = [[] for _ in range(D)]
for i in range(1, H*W+1):
	if i <= D:
		power[i%D].append(0)
	else:
		idx = i%D
		tmp = abs(dic[i][0]-dic[i-D][0]) + abs(dic[i][1]-dic[i-D][1])
		power[i%D].append(tmp)

#print(power)
power_acc = []
for x in power:
	power_acc.append(list(accumulate(x)))
power_acc[0].insert(0, 0)
#print(power_acc)

Q = INT()
for _ in range(Q):
	L, R = MAP()
	print(power_acc[R%D][R//D-1] - power_acc[L%D][L//D-1])

### FIXED CODE ###

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, gcd, log
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7 
#mod = 998244353
from decimal import *
#import numpy as np
#decimal.getcontext().prec = 10

N = INT()
A = [LIST() for _ in range(N)]

match_id = [[0]*N for _ in range(N)]

def toid(i, j):
	i, j = sorted([i, j])
	return match_id[i][j]

cnt = 0
for i in range(N):
	for j in range(N):
		if i < j:
			match_id[i][j] = cnt
			cnt += 1

V = N*(N-1)//2

gout = [[] for _ in range(V)]
deg = [0]*V
for i in range(N):
	for j in range(N-2):
		gout[toid(i, A[i][j]-1)].append(toid(i, A[i][j+1]-1))
		deg[toid(i, A[i][j+1]-1)] += 1

topo = [v for v in range(V) if deg[v] == 0 ]
day = [0]*V
deq = deque(topo)
ans = 0
while deq:
	v = deq.popleft()
	for t in gout[v]:
		deg[t] -= 1
		if deg[t] == 0:
			deq.append(t)
			day[t] = day[v] + 1
			ans = day[t]
if any(deg):
	print(-1)
	exit()
print(ans+1)
# -*- coding: utf-8 -*-
 
n, k, q =map(int, input().split())
a = []
m = [k]*n
for i in range(q):
  a[i] = int(input())

for i in a:
  m[i-1]+=1
  for j in range(n):
    m[j]-=1

for i in range(n):
  if m[i]>0:
    print("Yes")
  else:
    print("No")

### FIXED CODE ###

# -*- coding: utf-8 -*-
 
n, k, q =map(int, input().split())
a = [int(input()) for i in range(q)]

p = [0]*(n+1)

for i in range(q):
  p[a[i]] += 1
  

for i in range(1,n+1):
  if p[i]>q-k:
    print("Yes")
  else:
    print("No")
a＝input()
b＝input()
c＝input()
print(a[0]+b[1]+c[2])


### FIXED CODE ###


a=input()
b=input()
c=input()
print(a[0]+b[1]+c[2])
n, m = map(int, input().split())

l, r = map(int, input().split())


def check(i, l, r):
    if r - l + 1 == 0:
        return 0
    if i == m:
        return r - l + 1
    l_, r_ = map(int, input().split())
    nl = max(l, l_)
    nr = min(r, r_)
    return check(i + 1, nl, nr)


print(check(1, l, r))


### FIXED CODE ###

n, m = map(int, input().split())
l, r = map(int, input().split())
li = []


for _ in range(m - 1):
    l_, r_ = map(int, input().split())
    l = max(l, l_)
    r = min(r, r_)


print(max(r - l + 1, 0))
n = int(input().split())
if n >= 105:
    print(1)
else:
  print(0)


### FIXED CODE ###

n = int(input())
a = 0
if n >= 105:
    a += 1
if n >= 135:
    a += 1
if n >= 165:
    a += 1
if n >= 189:
    a += 1
if n >= 195:
    a += 1
print(a)
n = int(input())
a = list(map(int, input().split()))
a.sort()
num = 0
l = []

for i in range(n):
    flag = 0
    if i == 0:
        if a[0]==a[1]:
            l.append(a[0])
            continue
        else:
            l.append(a[0])
            num += 1
            continue
    for j in l:
        if a[i]%j:
            flag = 1
            break
        else:
            break
    if flag:
        l.append(a[i])
        num += 1

print(num)

### FIXED CODE ###

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

l = [0]*(10**6 +1)
for i in a:
    l[i]+=1
num = 0

for i in range(10**6+1):
    if l[i] == 1:
        num += 1
    if l[i] != 0:
        for j in range(2*i, 10**6+1, i):
            if l[j]:
                l[j] += 1
print(num)
def walking():
    x, k, d = map(int, input().split())
    r = 0
    if x > 0 and x > k * d:
        return x - k * d
    elif x < 0 and x < -k * d:
        return x + k * d
    elif x > 0 and x < k * d:
        r = x//d
        if (k - r)%2 == 0:
            return x - r * d
        else:
            return x - (r + 1 ) * d
    elif x < 0 and x < -k * d:
        r = x//d
        if (k + r)%2 == 0:
            return x - r * d
        else:
            return x - (r + 1 ) * d        
    
loc = walking()
print(abs(loc))

### FIXED CODE ###

k = input()

if k == "RRR":
    print(3)
elif k == "RRS":
    print(2)
elif k == "SRR":
    print(2)
elif k == "RSS":
    print(1)
elif k == "RSR":
    print(1)
elif k == "SSR":
    print(1)
elif k == "SRS":
    print(1)
else:
    print(0)
N = int(input())
S = list(input())
count = 0

for i in range(N):
    if S[i]==("A"):
        if S[i+1]==("B"):
            if S[i+2]==("C"):
                count += 1


print(count)

### FIXED CODE ###

n = int(input())
s = input()
count = 0

while True:
    if 'ABC' in s:
        s = s.replace('ABC', '', 1)
        count += 1
    else:
        break

print(count)
def main():
  a=int(input())
  b=int(input())
  c=6-a-b
  print(c)
  
 if __name__ == ′__main__′:
  main()
  
  

### FIXED CODE ###

def main():
  A = int(input())
  B = int(input())
  C = 6-A-B
  print('{}'.format(C))


if __name__ == '__main__':
  main()
#coding: utf-8
#ABC043D
import sys

s=raw_input()

for i in xrange(len(s)-1):
 if s[i]==s[i+1]:
  print i+1,i+2
  sys.exit()

for i in xrange(len(s)-1):
 if s[i]==s[i+2]:
  print i+1,i+3
  sys.exit()
  
print -1,-1


### FIXED CODE ###

#coding: utf-8
#ABC043D
import sys

s=raw_input()

for i in xrange(len(s)-1):
 if s[i]==s[i+1]:
  print i+1,i+2
  sys.exit()

for i in xrange(len(s)-2):
 if s[i]==s[i+2]:
  print i+1,i+3
  sys.exit()
  
print -1,-1
string = input()
n = int(input())

for i in range(n):
	command = input().split()
	c_n = command[0]
	c_i1 = command[1]
	c_i2 = command[2]
	if c_n =='print':
		print(string[c_i1:c_i2])
	elif c_n =='revese':
		string = string[:c_i1]+string[c_i1:c_i2][::-1]+string[c_i2:]
	else:
		string = string[:c_i1] + command[3] + string[c_i2]		

### FIXED CODE ###

string = input()
 
n = int(input())
 
for i in range(n):
    command = input().split()
    c_n = command[0]
    c_i1 = int(command[1])
    c_i2 = int(command[2]) + 1
    if c_n == "print":
        print(string[c_i1:c_i2])
    elif c_n == "reverse":
        string = string[:c_i1] + string[c_i1:c_i2][::-1] + string[c_i2:]
    else:
        string = string[:c_i1] + command[3] + string[c_i2:]
h,w,m=map(int, input().split())
r = [0]*h
c = [0]*w

for i in range(m):
    x,y=map(int, input().split())
    r[x]+=1
    c[y]+=1

print(r,c,max(r)+max(c))

### FIXED CODE ###

h,w,m=map(int, input().split())
r = [0]*max(h,w)
c = [0]*max(h,w)
l=[]

for i in range(m):
    x,y=map(int, input().split())
    r[x-1]+=1
    c[y-1]+=1
    l.append([x,y])

cm = max(c)
rm = max(r)
ci = [i for i, x in enumerate(c) if x == cm]
ri = [i for i, x in enumerate(r) if x == rm]
ans = cm + rm

cnt = 0
#print(l,ci,ri)
for i in range(m):
    if r[l[i][0]-1] == rm and c[l[i][1]-1] ==cm:
        cnt += 1

if cnt == len(ci)*len(ri):
    print(int(ans)-1)
else:
    print(int(ans))
def get_quad(n, p):
    if n < 19:
        return 13
    n = (n + 1) // 10 * 10 - 1
    for ni in range(n,0,-10):
        if p[ni] and p[ni - 2] and p[ni - 6] and p[ni - 8]:
            return ni
        
def sieve():
    n = 10000001
    p = [1] * n
    p[0] = p[1] = 0
    
    for i in range(int(n ** 0.5)):
        if p[i]:
            for j in range(2 * i, len(p), i):
                p[j] = 0
    return p

prime = sieve()
while True:
    n = f.readline().strip()
    if not n.isdigit():
        continue
    n = int(n)
    if n == 0:
        break
    print(get_quad(n, prime))

### FIXED CODE ###

def get_quad(n, p):
    if n < 19:
        return 13
    n = (n + 1) // 10 * 10 - 1
    for ni in range(n,0,-10):
        if p[ni] and p[ni - 2] and p[ni - 6] and p[ni - 8]:
            return ni
        
def sieve():
    n = 10000001
    p = [1] * n
    p[0] = p[1] = 0
    
    for i in range(int(n ** 0.5)):
        if p[i]:
            for j in range(2 * i, len(p), i):
                p[j] = 0
    return p

import sys
f = sys.stdin

prime = sieve()
while True:
    n = f.readline().strip()
    if not n.isdigit():
        continue
    n = int(n)
    if n == 0:
        break
    print(get_quad(n, prime))
import sys
input = sys.stdin.readline
a,b,n = map(int,input().split())
li = []
append = li.append
siki = int((a*(x))/b) - a * int(x/b)
for x in range(n+1):
    append(siki)
print(max(li))

### FIXED CODE ###

import math
 
A, B, N = map(int, input().split())
 
 
ans1 = 0
 
if N > B - 1:
    x = B-1
    print(int((A * x) / B) - A * int(x / B))
elif N <= B - 1:
    x = N
    print(int((A * x) / B) - A * int(x / B))
import numpy as np

k = 0


def calc(a):
    return np.sum(a) >= k


def main():
    global k
    n, k = map(int, input().split())
    a = np.array(list(map(int, input().split())))
    answer = 0
    list_pattern = []
    for i1 in range(n):
        for i2 in range(len(a)):
            list_pattern.append(a[i1:i2 + 1])

            # if a[i1:i2 + 1].sum() >= k:
            #     answer += 1
    list_answer = map(calc, list_pattern)
    print(sum(list_answer))


if __name__ == "__main__":
    main()


### FIXED CODE ###

if __name__ == '__main__':
    x, a = map(int, input().split())
    if x < a:
        print(0)
    else:
        print(10)
x,n=map(int,input().split())
if(n!=0):
    a=list(map(int,input().split()))
else:
    a=[]

if x not in a:
    print(x)
else:
    a.sort()
    idx=a.index(x)
    i=max(idx-1,0)
    j=min(idx+1,n-1)
    d=1
    ans=0
    while(True):
        if(a[i]!=x-d):
            ans=x-d
            break
        else:
            i-=1
        if(a[j]!=x+d):
            ans=x+d
            break
        else:
            j+=1
        d+=1
    print(ans)


### FIXED CODE ###

x,n=map(int,input().split())
if(n!=0):
    a=list(map(int,input().split()))
else:
    a=[]

if x not in a:
    print(x)
else:
    a.sort()
    idx=a.index(x)
    i=max(idx-1,0)
    j=min(idx+1,n-1)
    d=1
    ans=0
    while(True):
        if(a[i]!=x-d):
            ans=x-d
            break
        else:
            i=max(i-1,0)
        if(a[j]!=x+d):
            ans=x+d
            break
        else:
            j=min(j+1,n-1)
        d+=1
    print(ans)
import math

def xv(num):
    return 2 * math.floor(0.5 * num)

a = list(map(int, input().split()))
ans = 0

Que = xv(a[0]) + xv(a[3]) + xv(a[4])

if (a[3] or a[4]) == 0:
    pass
else:
    a[0] = a[0] - 1
    a[3] = a[3] - 1
    a[4] = a[4] - 1

    Qae = 3 + xv(a[0]) + xv(a[3]) + xv(a[4])

ans = ans + a[1] + max(Que,Qae)
print(ans)

### FIXED CODE ###

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

ans = a[1] + 2*(a[0]//2 + a[4]//2 + a[3]//2)
if a[0]>0 and a[3]>0 and a[4]>0:
  ans = max(ans, a[1] + 2*((a[0]-1)//2 + (a[3]-1)//2 + (a[4]-1)//2) + 3)
  
print(ans)
A, B, C = map(int,input().split())
if A>B:
	print(A*10 +B+C)
elif A<B:
    print(A+B*10+C)
else:
	if A*10+B+C>A+B*10+C:
        print(A*10+B+C)
    else:
        print(A+B*10+C)
  


### FIXED CODE ###

C,A, B = sorted(map(int,input().split()))
if A>B:
  print(A*10 +B+C)
elif A<B:
  print(A+B*10+C)
else:
  print(A+B*10+C)
import decimal

L=int(input())

#decimal.getcontext().prec = 6
x = decimal.Decimal(L / 3)

V=decimal.Decimal(x*x*x)

print("{:.24f}".format(V))

### FIXED CODE ###

import math

#入力
N, M = map(int, input().split())


#combination 関数
def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

#main
if N <=1 and M <= 1:
  print(0)

elif N <= 1 and M>=2:
  print(combinations_count(M,2))

elif M <=1 and N>=2:
  print(combinations_count(N,2))
  
elif N >=2 and M >=2:
  print(combinations_count(N,2)+combinations_count(M,2))
import math
N = int(input())
A = int(math.sqrt(N))
for i in reversed(range(A)):
	if(N%i==0):
		print(len(str(N//i)))
		exit()

### FIXED CODE ###

N = int(input())
A = int(N**0.5)
for i in reversed(range(A+1)):
	if(N%i==0):
		print(len(str(N//i)))
		exit()
n, s = map(int, input().split())
a = list(map(int, input().split()))

dp = [[0 for _ in range(s + 1)] for j in range(n + 1)]
dp[0][0] = 1

ans = 0
for i in range(n):
    for j in range(s + 1):
        dp[i + 1][j] += dp[i][j]
        if j >= a[i]:
            if j == a[i]:
                dp[i + 1][j] += i + 1
            else:
                dp[i + 1][j] += dp[i][j - a[i]]
    ans += dp[i + 1][s]
    ans %= mod
print(ans)


### FIXED CODE ###

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

dp = [[0 for _ in range(s + 1)] for j in range(n + 1)]
dp[0][0] = 1

ans = 0
for i in range(n):
    for j in range(s + 1):
        dp[i + 1][j] += dp[i][j]
        if j >= a[i]:
            if j == a[i]:
                dp[i + 1][j] += i + 1
            else:
                dp[i + 1][j] += dp[i][j - a[i]]
    ans += dp[i + 1][s]
    ans %= mod
print(ans)
N = int(input())
An = list(map(int, input().split()))

for n in range(N):
    An[n] -= (n+1)

An.sort()

m = N-1
if (m % 2 == 0):
    m = m//2
    cent = (An[m] + An[m + 1]) // 2
else:
    cent = An[(m+1)//2]

ans = 0
for n in range(N):
    ans += abs(An[n] - cent)

print(ans)

### FIXED CODE ###

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

for n in range(N):
    An[n] -= (n+1)

An.sort()

if (N-1) % 2 != 0:
    m = N//2 - 1
else:
    m = (N-1)//2

bf = -sum(An[0:m+1:]) + (m+1)*An[m]
af = sum(An[m+1::]) - (N-m-1)*An[m]
ans = bf + af
print(ans)
import numpy as np

def Probability(p,n):
    dp = [[0 for i in range(n+1)] for j in range(n+1)]
   
    dp[0][0] = 1.0
    
    for i in range(1,n+1):
        for j in range(0,n+1):
            if j==0:
                dp[i][j] = dp[i - 1][j] * (1.0 - p[i-1]) 
            else : 
                dp[i][j] = (dp[i - 1][j] * (1.0 - p[i-1]) +
                            dp[i - 1][j - 1] * p[i-1])  
    ans=0.0
    for i in range((n+1)//2,n+1):
        ans+=dp[n][i]
    return ans 

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

 

print(Probability(a,n))



    
        
    
    

### FIXED CODE ###


    

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

 
dp = [[0 for i in range(n+1)] for j in range(n+1)]
   
dp[0][0] = 1.0

for i in range(1,n+1):
    for j in range(0,n+1):
        if j==0:
            dp[i][j] = dp[i - 1][j] * (1.0 - p[i-1]) 
        else : 
            dp[i][j] = (dp[i - 1][j] * (1.0 - p[i-1]) +
                        dp[i - 1][j - 1] * p[i-1])  
ans=0.0
for i in range((n+1)//2,n+1):
    ans+=dp[n][i]
print( ans)
# -*- coding: utf-8 -*-
import numpy as np

S = [int(x) for x in list(input())]

if len(S)==1:
    print(1)

elif len(S)==2:
    if S[0] == S[1]:
        print(2)
    else:
        print(1)
else:
    l = []
    c = 1
    for i in range(len(S)-1):
        if S[i] == S[i+1]:
            c += 1
        else:
            l.append(c)
            c = 1
    l.append(c)
    ans = max(l)
    if ans in l[1:-1]:
        print(ans+1)
    else:
        print(ans)
    


### FIXED CODE ###

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

A, B, C, D = [int(x) for x in input().split()]

if A + B > C + D:
    print("Left")

elif A + B == C + D:
    print("Balanced")

elif A + B < C + D:
    print("Right")
H,W=map(int,input().split())
for i in range(a):
  x = input()
  print(x)
  print(x)

### FIXED CODE ###

H,W=map(int,input().split())
for i in range(H):
  x = input()
  print(x)
  print(x)
import sys
S=input()
if n>1:
    for i in range(n//2):
        s=S[2*i]
        if s=="L":
            print("No")
            sys.exit()
        s=S[2*i+1]
        if s=="R":
            print("No")
            sys.exit()
if n%2==1:
    s=S[-1]
    if s=="L":
        print("No")
        sys.exit()
print("Yes")

### FIXED CODE ###

import sys
S=input()
n=len(S)
if n>1:
    for i in range(n//2):
        s=S[2*i]
        if s=="L":
            print("No")
            sys.exit()
        s=S[2*i+1]
        if s=="R":
            print("No")
            sys.exit()
if n%2==1:
    s=S[-1]
    if s=="L":
        print("No")
        sys.exit()
print("Yes")
from itertools import accumulate
N, Q = map(int, input().split())
graph = [[] for _ in range(N)]
visited = [0] * N
children = [0] * N
count = 0
order = [0] * N
def dfs_recursive(edge):
    global count
    visited[edge] = 1
    order[edge] = count
    count += 1
    child = edge
    for e in graph[edge]:
        if not visited[e]:
            child = dfs_recursive(e)
    children[edge] = child
    return child
for _ in range(N - 1):
    a, b = map(lambda n: int(n) - 1, input().split())
    graph[a].append(b)
    graph[b].append(a)
dfs_recursive(0)
imos = [0] * (N + 1)
for _ in range(Q):
    p, x = map(int, input().split())
    root = p - 1
    root_idx = order[root]
    child = children[root]
    child_idx = order[child]
    imos[root_idx] += x
    imos[child_idx + 1] -= x
ans = list(accumulate(imos))
ans.pop()
print(*ans)

### FIXED CODE ###

from collections import deque
def dfs(graph, N, start, points):
    visited = [0] * N
    visited[start] = 1
    stack = deque([(start, points[start])])
    ret = [0] * N
    while stack:
        edge, point = stack.pop()
        ret[edge] = point
        for e in graph[edge]:
            if not visited[e]:
                visited[e] = 1
                stack.append((e, point + points[e]))
    return ret

N, Q = map(int, input().split())
graph = [[] for _ in range(N)]
for _ in range(N - 1):
    a, b = map(lambda n: int(n) - 1, input().split())
    graph[a].append(b)
    graph[b].append(a)
points = [0] * N
for _ in range(Q):
    p, x = map(int, input().split())
    points[p - 1] += x
print(*dfs(graph, N, 0, points))
import math

a=int(input())

sum=0
ok=0

for i in range(n):
	ok=0
	n=int(input())
	if n==2 or n==3:
		sum+=1
	if n>3:
		for j in range(2,int(math.sqrt(n))+1):
			
			if n%j==0:
				ok=1
		if ok==1:
			sum+=1
			
print(sum)


### FIXED CODE ###


import math

n=int(input())

sum=0

for i in range(n):
	b=1
	n=int(input())
	for j in range(2,int(math.sqrt(n))+1):
		if n%j==0:
			b=0
			break
	sum+=b
			
print(sum)
'''def f(a, b):
    if a * b == 0:
        return 0
    res = f(min(a, b), max(a, b) % min(a, b)) + 2 * min(a, b) * (max(a,b)//min(a, b))
    if(max(a, b) % min(a, b) == 0):
        res -= 1
    return res'''
def f(a, b):
    if(a - b == 0):
        return a
    if(a * b == 0):
        return 0
    return 2 * min(a, b) + f(min(a, b), max(a,b) - min(a, b))

n, x = map(int, input().split())
res = n + f(n - x, x)
print(res)


### FIXED CODE ###

def f(a, b):
    if a * b == 0:
        return 0
    res = f(min(a, b), max(a, b) % min(a, b)) + 2 * min(a, b) * (max(a,b)//min(a, b))
    if(max(a, b) % min(a, b) == 0):
        res -= min(a, b)
    return res

n, x = map(int, input().split())
res = n + f(n - x, x)
print(res)
import numpy as np
ans = 0

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

P = int(round(np.average(X)))

for i in range(N):
    ans += ((X[i] - P)**2)

print(ans)


### FIXED CODE ###

import numpy as np
ans = 0

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

P = int(round(np.average(X)))

for i in range(N):
    ans += ((X[i] - P)**2)

print(ans)
# -*- coding: utf-8 -*-
X,A,B = map(int,input().split())
if B - A > X:
  print(dangerous)
elif B - A <= X and B - A > 0:
  print(safe)
else:
  print(delicious)

### FIXED CODE ###

# -*- coding: utf-8 -*-
X,A,B = map(int,input().split())
if B - A > X:
  print("dangerous")
elif B - A <= X and B - A > 0:
  print("safe")
else:
  print("delicious")
a,b,c,k = map(int,input().split())
l,m = 0,1
for i in renge(k-1):
    l,m = 2*m,l+m
ans = (l-m)*a + (m-l)*b
if ans > 10**18:
    print('Unfair')
else:
  print(ans)

### FIXED CODE ###

a,b,c,k = map(int,input().split())
if k%2 == 0:
    print(a-b)
else:
    print(b-a)
import numpy as np

N, K = map(int, input().split())
A = [int(i) for i in input().split()]

G = np.gcd.reduce(A)
M = max(A)

if K % G == 0 and K <= M:
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')


### FIXED CODE ###

import numpy as np
import fractions

gcd_ufunc = np.frompyfunc(fractions.gcd, 2, 1)

N, K = map(int, input().split())
A = [int(i) for i in input().split()]

G = gcd_ufunc.accumulate(A, dtype=np.object).astype(np.int)[-1]
M = max(A)

if K % G == 0 and K <= M:
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')
n,k = map(int,input().split())
lis = list(map(int,input().split()))
for i in range(k):
  if lis[i] < lis[i+k]:
    print("Yes")
  else:
    print("No")

### FIXED CODE ###

n,k = map(int,input().split())
lis = list(map(int,input().split()))
for i in range(n-k):
  if lis[i] < lis[i+k]:
    print("Yes")
  else:
    print("No")