Harryxun/stf_run huggingface dataset:
a = input()
b = input()
c = input()
d = input()

a = int(a)
b = int(b)
c = int(c)
d = int(d)

n = b - a
m = c - b

if (n <= d)and(m <= d):
    print("Yes")
else:
    print("No")


### FIXED CODE ###

a,b,c,d=map(int,input().split())
if abs(b-a)<=d and abs(c-b)<=d or abs(c-a)<=d:
    print("Yes")
else:
    print("No")
S = input()
K = int(input())
d=[[0 for _ in range(100)] for _ in range(4)]
ans = [0,0,0,0]
l = len(S)
odd_diff = 0
even_diff = 0
if l == 1:
    ans = K // 2
    print(ans)
if l > 1:
    for i in range(4):
        s = S * (i + 1)
        l = len(s)
        for j in range(l-1):
            
            if j == 0 and s[j] == s[j+1]:
                ans[i] += 1
                d[i][0] = 1
            if j > 0 and s[j] == s[j+1] and d[i][j-1] == 0:
                ans[i] += 1
                d[i][j] = 1
    if K <= 4:
        print(ans[K-1])
    elif K > 4 and K % 2 == 0:
        even_diff = ans[3] - ans[1]
        print(int(ans[1]+(K/2)*even_diff))
    elif K > 4 and K % 2 == 1:
        odd_diff = ans[2] - ans[0]
        print(int(ans[0]+(K//2)*odd_diff))

### FIXED CODE ###

S = input()
K = int(input())
d=[[0 for _ in range(400)] for _ in range(4)]
ans = [0,0,0,0]
l = len(S)
odd_diff = 0
even_diff = 0
if l == 1:
    print(int(K//2))
if l > 1:
    for i in range(4):
        s = S * (i + 1)
        l = len(s)
        for j in range(l-1):
            
            if j == 0 and s[j] == s[j+1]:
                ans[i] += 1
                d[i][0] = 1
            if j > 0 and s[j] == s[j+1] and d[i][j-1] == 0:
                ans[i] += 1
                d[i][j] = 1
    if K <= 4:
        print(int(ans[K-1]))
    elif K > 4 and K % 2 == 0:
        even_diff = ans[3] - ans[1]
        print(int(ans[1]+(K/2-1)*even_diff))
    elif K > 4 and K % 2 == 1:
        odd_diff = ans[2] - ans[0]
        print(int(ans[0]+(K//2)*odd_diff))
N=int(input())
ans='No'
if N[0]==7 or N[1]==7 or N[2]== 7:
  ans = 'Yes'
print(ans)

### FIXED CODE ###

N=str(input())
ans='No'
if int(N[0])==7 or int(N[1])==7 or int(N[2])==7:
  ans='Yes'
print(ans)
import bisect

N,M=map(int,input().split())
A=list(map(int,input().split()))
BC=[list(map(int,input().split())) for i in range(M)]

A.sort()
BC.sort(key=lambda x: x[1],reverse=True) 
ans=0
for j in range(M):
    if A[0]>=BC[j][1] or len(A)==0:
        break
    else:
        b=BC[j][0]
        c=BC[j][1]
        R=bisect.bisect_left(A,c)
        n=len(A)
        if R>=b:
            if b>=n:
                A=[]
                ans+=b*c
                break
            else:
                A[0:b]=[]
                ans+=b*c
        else:
            A[0:R]=[]
            ans+=R*c
        
print(sum(A)+ans)

### FIXED CODE ###

import bisect

N,M=map(int,input().split())
A=list(map(int,input().split()))
BC=[list(map(int,input().split())) for i in range(M)]

A.sort()
BC.sort(key=lambda x: x[1],reverse=True) 
ans=0
for j in range(M):
    if A[0]>=BC[j][1]:
        break
    else:
        b=BC[j][0]
        c=BC[j][1]
        R=bisect.bisect_left(A,c)
        n=len(A)
        if R>b:
            if n<=b:
                A=[]
                ans+=n*c
                break
            else:
                del A[0:b]
                ans+=b*c
        else:
            del A[0:R]
            ans+=R*c
    if len(A)==0:
        break        
print(sum(A)+ans)
import sympy

### FIXED CODE ###

n = int(input())
ans=0
for i in range(1,n):
    ans+=int((n-1)/i)
print(ans)
def main():
    import sys
    def input(): return sys.stdin.readline().rstrip()
    n, k = map(int, input().split())
    a = list(map(int, input().split()))
    mod = 10 ** 9+ 7
    ans = 1

    def answer(a):
        ans =1
        for i in range(k):
            ans *= a[i]
            ans %= mod
        print(ans)

    if n == k:
        answer(a)
        return

    if all([True if x < 0 else False for x in a]):
        a.sort(reverse=True)
        answer(a)
        return

    a.sort(reverse=True, key=lambda x: abs(x))
    flag = 1
    for i in range(k):
        if a[i] < 0:
            flag ^= 1
    if flag or a[k-1] == 0:
        answer(a)
        return
    
    x1, x2, y1, y2 = k-1, k-1, k, k
    while a[x1]*a[x2] > 0 and x2 >= 0:
        x2 -= 1

    while a[x1]*a[y1] > 0 and y1 < n:
        y1 += 1

    if x2 == -1:
        a[x1], a[y1] = a[y1], a[x1]
    else:
        while a[x2]*a[y2] > 0 and y2 < n:
            y2 += 1
        if y1 == n:
            a[x2], a[y2] = a[y2], a[x2]
        else:
            if a[x1]*a[y2] < a[x2]*a[y1]:
                a[x1], a[y1] = a[y1], a[x1]
            else:
                a[x2], a[y2] = a[y2], a[x2]
    answer(a)
 

if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    import sys
    def input(): return sys.stdin.readline().rstrip()
    n, k = map(int, input().split())
    a = list(map(int, input().split()))
    mod = 10 ** 9+ 7
    ans = 1

    def answer(a):
        ans =1
        for x in a:
            ans *= x
            ans %= mod
        return ans

    if n == k:
        print(answer(a))
        return
    a.sort(reverse=True, key= lambda x:abs(x))
    if sum(x<0 for x in a[:k])%2 == 0:
        print(answer(a[:k]))
    else:
        if all(x < 0 for x in a):
            print(answer(a[-k:]))
        else:
            try:
                x1, y1= min([x for x in a[:k] if x > 0]), min([x for x in a[k:] if x < 0])
            except ValueError:
                x1, y1 = 1, 0
            try:
                x2, y2= max([x for x in a[:k] if x < 0]),\
                    max([x for x in a[k:] if x >= 0])
            except ValueError:
                x2, y2 = 1, 0
            if abs(x2*y1) > abs(x1*y2):           
                a[a.index(x1)] = y1
            else:
                a[a.index(x2)] = y2
            print(answer(a[:k]))
            


if __name__ == '__main__':
    main()
data = [
    [[0 for r in range(10)] for f in range(3)] for b in range(4)
]

# ??\?????????????????????????????§????????????????????????????????????
count = int(input(1))
for c in range(count):
    c, f, r, v = [int(1) for i in input().split]
    data[v - 1][f - 1][r - 1] += v


for bi, b in enumerate(data):
    for f in b:
        for r in f:
            print(' {0}'.format(r), end='')

        print()

    if bi < 3:
        print('#' * 20)

### FIXED CODE ###

data = [
    [[0 for r in range(10)] for f in range(3)] for b in range(4)
]
    
count = int(input())
for c in range(count):
    b,f,r,v = [int(i) for i in input().split()]
    data[b-1] [f-1] [r-1] += v
    
for bi, b in enumerate(data):
    for f in b:
        for r in f:
            print(' {0}'.format(r), end='')
        print()
    if bi < 3:
        print('#' * 20)
n=int(input())
v=[]
for i in range(1,n):
    for j in range(1,n):
        k=n-i-j 
        if k>0:
            v.append(i*j*k)
print(max(v))

### FIXED CODE ###

n=float(input())
v=[0]
print(n/3*n/3*n/3)
def main():
  N,M =map(int, input().split())
  s,c=[],[]
  for i in range(M):
    si,ci = map(int, input().split())
    s.append(si)
    c.append(ci)
  
  res=[0]*N
  for si,ci in zip(s,c):
    if res[si-1]== 0:
      res[si-1]=str(ci)	
    elif res[si-1]!= str(ci):
      print(-1)
      exit()
  
  if res==['0']*N:
    print(-1)
    exit()
  su = int("".join(res))
  if su < 10**(N-1):
    print(-1)
    exit()
    
  print(int("".join(res)))
  
    
if __name__=="__main__":
  main()

### FIXED CODE ###

# import numpy as np
def main():
  N,M =map(int, input().split())
  s,c=[],[]
  for i in range(M):
    si,ci = map(int, input().split())
    s.append(si)
    c.append(ci)
  
  res=['']*N
  for si,ci in zip(s,c):
    if res[si-1]== '':
      res[si-1]=str(ci)	
    elif res[si-1]!= str(ci):
      print(-1)
      exit()

  
  if res[0]=='0':
    if N==1:
      print(0)
      exit()
    else:
      print(-1)
      exit()
  elif res[0]=='':
    res[0]=str(1)
   
  for i in range(N):
    if res[i]=='':
      res[i]=str(0)
  if M==0 and N==1:
    print(0)
    exit()
  print(int("".join(res)))
  
    
if __name__=="__main__":
  main()
n=int(input())
if 7 in n:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

a=input()
if '7' in a:
  print('Yes')
else:
  print('No')
import numpy as np
inputs = open(0).readlines()

h, w, k = map(int, inputs[0].split())
cake = np.zeros((h, w), dtype=np.int)
count = 0
coords = {}
for i, s in enumerate(inputs[1:]):
    for j, c in enumerate(s):
        if c == '#':
            count += 1
            cake[i, j] = count
            coords[count] = (j, i)
            
for i in range(1, count+1):
    x, y = coords[i]
    x0, y0 = x-1, y-1
    x1, y1 = x+1, y+1
    while 0 <= x0 and cake[y, x0] == 0:
        cake[y, x0] = i
        x0 -= 1
    x0 += 1
    while x1 < w and cake[y, x1] == 0:
        cake[y, x1] = i
        x1 += 1
    while 0 <= y0 and np.all(cake[y0, x0:x1] == 0):
        cake[y0, x0:x1] = i
        y0 -= 1
    while y1 < h and np.all(cake[y1, x0:x1] == 0):
        cake[y1, x0:x1] = i
        y1 += 1

for rows in cake:
    print(*rows)

### FIXED CODE ###

import numpy as np
inputs = open(0).readlines()

def main(inputs):
    h, w, k = map(int, inputs[0].split())
    cake, count, coords = np.zeros((h, w), dtype=np.uint), 0, {}
    for i, s in enumerate(inputs[1:]):
        for j, c in enumerate(s):
            if c == '#':
                count += 1
                cake[i, j] = count
                coords[count] = (j, i)
    empty_rows = {i for i, rows in enumerate(cake) if not np.any(rows)}

    for i in range(1, count+1):
        x, y = coords[i]
        x0, y0 = x-1, y-1
        x1, y1 = x+1, y+1
        while 0 <= x0 and cake[y, x0] == 0:
            cake[y, x0] = i
            x0 -= 1
        x0 += 1
        while x1 < w and cake[y, x1] == 0:
            cake[y, x1] = i
            x1 += 1
        while 0 <= y0 and y0 in empty_rows:
            cake[y0, x0:x1] = i
            y0 -= 1
        while y1 < h and y1 in empty_rows:
            cake[y1, x0:x1] = i
            y1 += 1

    for rows in cake:
        print(*rows)

main(inputs)
a,b,c=map(int,input().split())
if a+b>=c and a<=c
  print("YES")
else:
  print("NO")


### FIXED CODE ###

a,b,c=map(int,input().split())
if a+b>=c>=a:
  print("YES")
else:
  print("NO")
# -*- coding: utf-8 -*-
import sys

N, K = map(int, input().split())
l = list(map(int, input().split()))

l.sort()

X = range(K, -1, -1)

s = 0
for i in range(K, K-N+1, -1):
    s += l[i]

print(l, s, X)

### FIXED CODE ###

# -*- coding: utf-8 -*-
import sys

N, K = map(int, input().split())
l = list(map(int, input().split()))

l.sort()
s = 0
for i in range(K):
    s += l[N-K+i]

print(s)
su,keta,yosa=map(int,input().split())
if yosa<(su+keta):print(0);exit()
i=1
while su*(10**i)+keta*(i+1)<=yosa and i<10:
  i+=1
if i==10:print(10**9);exit()
f=(yosa-i*keta)//su
for j in range(f+3)[::-1]:
  if  j*su+keta*i<=yosa and len(str(j))==i:
    print(j)
    break

### FIXED CODE ###

s=input()
l=["SUN","MON","TUE","WED","THU","FRI","SAT"]
print(7-l.index(s))
S=input()
T=input()
aa=0
for s,t in zip(S,T):
  if s!=t:
    a+=1
print(a)

### FIXED CODE ###

S=input()
T=input()
aa=0
for s,t in zip(S,T):
  if s!=t:
    aa+=1
print(aa)
s = int(input())
print(min(abs(int(s[i:i+3]-753) for i in range(len(s)-2)))

### FIXED CODE ###

a = input()
list1 = []
for i in range(len(a)):
  b = int(a[i:i+3])
  c = abs(753 - b)
  list1.append(c)
  if i == len(a)-3:
    break
print(min(list1))
if __name__ == '__main__':

    N = input()
    array = raw_input().split()

    ans = 0
    total = int(array[0])

    totalZero = False
    if total == 0:
        totalZero = True
    
    
    flag = False
    if total >= 0:
        flag = True
        
    for a in array[1:]:

        if totalZero == True:
            ans += 1
            if a > 0:
                total = -1
                flag = False
            else:
                total = 1
                flag = True
            totalZero = False
            
        total += int(a)
        
        if total > 0 and flag == True:
            ans += total + 1
            total = -1
                
        elif total < 0 and flag ==False:
            ans += -1 * total + 1
            total = 1
                          
        elif total == 0:
            totalZero = True

        if total > 0:
            flag = True
        elif total < 0:
            flag = False

        
    if totalZero == True:
        ans += 1

    print ans    
    


### FIXED CODE ###

import sys

if __name__ == '__main__':
    string = raw_input().split()

    for strLine in string:
        sys.stdout.write(strLine[0].upper())
    print
a,b = map(int,input().split())
num = a * b
if num % 2 = 0:
    print('Even')
else:
    print('Odd')

### FIXED CODE ###

a,b = map(int,input().split())
num = a * b
if num % 2 == 0:
    print('Even')
else:
    print('Odd')
X,Y=list(map(int,input().split()))

import sys
if (2*Y-X)%3!=0 or (2*X-Y)%3!=0:
  print(0)
  sys.exit()
if (2*Y-X)%3<0 or (2*X-Y)<0:
  print(0)
  sys.exit()

x=(2*Y-X)//3
y=(2*X-Y)//3
#(x+y)Cxを求める
fac=[0 for i in range(x+y+1)]
inv=[0 for i in range(x+y+1)]
finv=[0 for i in range(x+y+1)]
#初期条件
p=1000000007
fac[0]=fac[1]=1
inv[1]=1
finv[0]=finv[1]=1
#テーブルの作成
for i in range(2,x+y+1):
  fac[i]=fac[i-1]*i%p
  #p=(p//a)*a+(p%a) a^(-1)=-(p//a)*(p%a)^(-1)
  inv[i]=(-(p//i)*inv[p%i])%p
  finv[i]=finv[i-1]*inv[i]%p
#求める
print(x+y)
print(x)
print(y)

print((fac[x+y]*finv[x]%p)*finv[y]%p)




### FIXED CODE ###

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

import sys
if (2*Y-X)%3!=0 or (2*X-Y)%3!=0:
  print(0)
  sys.exit()
if (2*Y-X)<0 or (2*X-Y)<0:
  print(0)
  sys.exit()
x=(2*Y-X)//3
y=(2*X-Y)//3
#(x+y)Cxを求める
fac=[0 for i in range(x+y+1)]
inv=[0 for i in range(x+y+1)]
finv=[0 for i in range(x+y+1)]
#初期条件
p=1000000007
fac[0]=fac[1]=1
inv[1]=1
finv[0]=finv[1]=1
#テーブルの作成
for i in range(2,x+y+1):
  fac[i]=fac[i-1]*i%p
  #p=(p//a)*a+(p%a) a^(-1)=-(p//a)*(p%a)^(-1)
  inv[i]=(-(p//i)*inv[p%i])%p
  finv[i]=finv[i-1]*inv[i]%p
#求める

print((fac[x+y]*finv[x]%p)*finv[y]%p)
import math
a=int(input())
print('{0:.6f} {1:.6f}'.format(a*a*math.pi, (a+a)*math.pi))


### FIXED CODE ###

import math
a=float(input())
print('{0:.6f} {1:.6f}'.format(a*a*math.pi, (a+a)*math.pi))
import numpy as np
N, M = [int(i) for i in input().split()]
L = [0]*M
R = [0]*M
for i in range(M):
    L[i], R[i] = [int(i) for i in input().split()]

Rmin = np.min(R)
Lmax = np.max(L)
if Rmin >= Lmax:
    num = np.min(R) - np.max(L) + 1
else
    num = 0
print(num)

### FIXED CODE ###

import numpy as np
N, M = [int(i) for i in input().split()]
L = [0]*M
R = [0]*M
for i in range(M):
    L[i], R[i] = [int(i) for i in input().split()]

Rmin = np.min(R)
Lmax = np.max(L)
if Rmin >= Lmax:
    num = np.min(R) - np.max(L) + 1
else:
    num = 0
print(num)
n,k = map(int,input().split())
pn = list(map(int,input().split()))
cn = list(map(int,input().split()))
ans = -float("inf")


for i in range(n): 
    start=i
    now=start
    total = 0 #ループ計
    ls = [0]

    for j in range(1, k+1):
        now = pn[now]-1
        total += cn[now]
        ans = max(ans, total)
        ls.append(total)
        if now == start:
            rp = j
            break
    else:
        continue  #roopなし

    if total <= 0:
        continue
    else:
        if k % rp == 0:
            ans2 = total * (k // rp-1) + max(ls)
            ans = max(ans, ans2)
        else:

            ans2 = total * (k//rp) + max(ls[:s+1])
            ans = max(ans, ans2)
print(ans)


### FIXED CODE ###

n,k = map(int,input().split())
pn = list(map(int,input().split()))
cn = list(map(int,input().split()))
ans = -float("inf")


for i in range(n): 
    start=i
    now=start
    total = 0 #ループ計
    ls = [0]

    for j in range(1, k+1):
        now = pn[now]-1
        total += cn[now]
        ans = max(ans, total)
        ls.append(total)
        if now == start:
            rp = j
            break
    else:
        continue  #roopなし

    if total <= 0:
        continue
    else:
        if k % rp == 0:
            ans2 = total * (k // rp-1) + max(ls)
            ans = max(ans, ans2)
        else:
            ans2 = total * (k//rp) + max(ls[:k%rp+1])
            ans = max(ans, ans2)
print(ans)
a = input(int())
s = input()
 
if a >= 3200 :
  print( s )
else:
  print( 'red' )

### FIXED CODE ###

a = int ( input() )
s = input()
 
if a >= 3200 :
  print( s )
else:
  print( 'red' )
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, floor
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
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(float, 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
#import numpy as np
#from decimal import *

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

lim = 2*10**9

left = []
right = []

for l, r in AB:
	left.append(l)
	right.append(r)

right.sort()
left.sort()

#print(right)
#print(left)

if N%2:
	print(right[N//2] - left[N//2] +1)
else:
	M = set()
	m1 = list(range(left[N//2-1], right[N//2-1]+1))
	m2 = list(range(left[N//2], right[N//2]+1))
	for x in m1:
		for y in m2:
			M.add(x+y)

	print(len(M))




### 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
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
from decimal import *
#import numpy as np
#decimal.getcontext().prec = 10


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

A, B = zip(*AB)
A = list(A)
B = list(B)

A.sort()
B.sort()

if N%2:
	a = A[N//2]
	b = B[N//2]
	print(b-a+1)
else:
	a = (A[N//2-1]+A[N//2])/2
	b = (B[N//2-1]+B[N//2])/2
	print(int((b-a)*2+1))
temparr = input()
from heapq import heappush, heappop
temparr = temparr.split()
n = int(temparr[0])
edg = int(temparr[1])
dicts = {}
secdict = {}
firstdict = {}
for e in range(edg):
    temparr = input()
    temparr = temparr.split()
    edgearr = []
    for i in temparr:
        edgearr.append(int(i))
    first = int(edgearr[0])
    sec = int(edgearr[1])
    if first not in dicts:
        dicts[first] = []
    dicts[first].append(sec)
    if sec not in secdict:
        secdict[sec] = 1 
    if first not in firstdict:
        firstdict[first] = 1 
        
head = []
for i in range(1, n + 1):
    if i not in secdict:
        heappush(head, (0, i))
tail = []
ans = {}
for i in range(1, n + 1):
    if i not in firstdict:
        tail.append(i)
        ans[i] = 0
maxdist = [0 for _ in range(n + 1)]

#print(ans)



def dfs(node):
    global ans, dicts
    #print(node)
    if node in ans:
        return ans[node]
    if node not in  dicts:
        return 0  
    best = 0 
    for neigh in dicts[node]:
        curnew = dfs(neigh) + 1
        if curnew > best:
            best = curnew
    
    ans[node] = best 
    return best

getmax =  0 
ans2 = 0 
for i in range(1, n + 1):
    ans2 = max(dfs(i), ans2)
print(ans2)

# while head:
#     cur = heappop(head)
#     curdis = int(cur[0])
#     node = cur[1]
#     nextdis = maxdist[node] + 1
#     if node not in dicts:
#         continue 
#     for neigh in dicts[node]:
#         if maxdist[neigh] < nextdis:
#             negdis = nextdis * -1
#             maxdist[neigh] = nextdis
#             heappush(head,(nextdis, neigh))

# print(max(maxdist))
    

    
    
    
    
    
    

### FIXED CODE ###

temparr = input()
from heapq import heappush, heappop

import sys
x=150000
sys.setrecursionlimit(x)
temparr = temparr.split()
n = int(temparr[0])
edg = int(temparr[1])
dicts = {}
secdict = {}
firstdict = {}
for e in range(edg):
    temparr = input()
    temparr = temparr.split()
    edgearr = []
    for i in temparr:
        edgearr.append(int(i))
    first = int(edgearr[0])
    sec = int(edgearr[1])
    if first not in dicts:
        dicts[first] = []
    dicts[first].append(sec)
    if first not in firstdict:
        firstdict[first] = 1 
tail = []
ans = {}

for i in range(1, n + 1):
    if i not in firstdict:
        tail.append(i)
        ans[i] = 0
        
def dfs(node):
    global ans, dicts
    if node in ans:
        return ans[node]
    if node not in  dicts:
        return 0  
    best = 0 
    for neigh in dicts[node]:
        curnew = dfs(neigh) + 1
        if curnew > best:
            best = curnew
    ans[node] = best 
    return best
ans2 = 0 
for i in range(1, n + 1):
    ans2 = max(dfs(i), ans2)
print(ans2)
N, K = map(int, input())

print(N - K + 1)


### FIXED CODE ###

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

print(N - K + 1)
import math
from itertools import accumulate

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

L = list(accumulate(a, math.gcd))
R = list(accumulate(reversed(a), math.gcd)) 

ans = 0
if n == 2:
    print(max(a))
else:
    for i in range(1,n):
        ans = max(math.gcd(L[i],R[i]),ans)
        print(max(ans))
    


### FIXED CODE ###

from fractions import gcd

n = int(input())
list_ = list(map(int, input().strip().split()))

gcd_from_left = [0]
gcd_from_right = [0]
for i in range(n):
    gcd_from_left.append(gcd(gcd_from_left[i], list_[i]))
    gcd_from_right.append(gcd(gcd_from_right[i], list_[-(i + 1)]))

gcd_from_left.insert(0, 0)
gcd_from_right.insert(0, 0)
gcd_from_right.reverse()

print(max(gcd(gcd_from_left[i], gcd_from_right[i]) for i in range(n + 2)))
# -*- coding: utf-8 -*-
import sys
import math
from decimal import Decimal
from scipy.special import comb
input = sys.stdin.readline


def main():
    n, r = map(int, input().split())
    if n <= 10:
        # r = x - (100 * (10 - n))
        print(r + 100 * (10 - n))

    else:
        print(r)


if __name__ == '__main__':
    main()


### FIXED CODE ###

# -*- coding: utf-8 -*-
import sys
input = sys.stdin.readline


def main():
    n, r = map(int, input().split())
    if n <= 10:
        # r = x - (100 * (10 - n))
        print(r + 100 * (10 - n))

    else:
        print(r)


if __name__ == '__main__':
    main()
a, b = map(int, input().split())
c, d = map(int, input().split())
if a == c or a == d or b == c or b == d:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

a = int(input())
b = int(input())
if a > b:
    print("GREATER")
elif a < b:
    print("LESS")
else:
    print("EQUAL")
n = input()
print(700 + (n.count('o')*100)

### FIXED CODE ###

n = input()
print(700 +100*n.count('o'))
import math
from functools import reduce

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

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

print( gcd_list(  a ) )

### FIXED CODE ###

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

res = a[0]

while True:
    base = res
    total = 0
    for i in a:
        if  i % base > 0:
            res = min( res, i % base)
        total +=  i % base
    if total == 0:
        break

print(base)