Harryxun/stf_run huggingface dataset:
import bisect
from itertools import accumulate
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline


def brute():
    N, K = map(int, input().split())
    L = [int(input()) for _ in range(N)]
    ans = 0
    for i in range(N):
        for j in range(i, N):
            if sum(L[i:j+1])/(j+1-i) >= K:
                ans += 1

    print(ans)


def solve():
    N, K = map(int, input().split())
    L = [int(input()) for _ in range(N)]

    L_acc = [0]+list(accumulate(L))
    for i in range(N+1):
        L_acc[i] -= (i)*K

    L_sort = list(sorted(set(L_acc)))
    L_comp = [-1]*(N+1)
    for i in range(N+1):
        key = L_acc[i]
        ind = bisect.bisect_left(L_sort, key)
        L_comp[i] = ind
    # BIT
    bit = [0]*(N+1)

    def sum_bit(i):
        s = 0
        while i > 0:
            s += bit[i]
            i -= i & (-i)
        return s

    def add(i, x):
        while i <= N:
            bit[i] += x
            i += i & (-i)

    ans = 0
    for i, l in enumerate(L_comp):
        if l == 0:
            ans += N-i
            continue
        ans += sum_bit(l)
        add(l, 1)
    print(ans)


solve()


    ans = 0
    for i, l in enumerate(L_comp):
        if l == 0:
            ans += N-i
            continue
        ans += sum_bit(l)
        add(l, 1)
    print(ans)


solve()


### FIXED CODE ###

import bisect
from itertools import accumulate
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline


def solve():
    N, K = map(int, input().split())
    L = [int(input()) for _ in range(N)]

    L_acc = [0]+list(accumulate(L))
    for i in range(N+1):
        L_acc[i] -= (i)*K

    L_sort = list(sorted(set(L_acc)))
    L_comp = [-1]*(N+1)
    for i in range(N+1):
        key = L_acc[i]
        ind = bisect.bisect_left(L_sort, key)
        L_comp[i] = ind
    # BIT
    bit = [0]*(N+1)

    def sum_bit(i):
        s = 0
        while i > 0:
            s += bit[i]
            i -= i & (-i)
        return s

    def add(i, x):
        while i <= N:
            bit[i] += x
            i += i & (-i)

    ans = 0
    for i, l in enumerate(L_comp):
        if l == 0:
            ans += N-i
            continue
        ans += sum_bit(l)
        add(l, 1)
    print(ans)


solve()
numbers = []
for line in sys.stdin:
	numbers.append(int(line))

answer = numbers[2] - numbers[1]

count = 1
while count < len(numbers) - 1:
	target = max(numbers[count : ])
	if target -  numbers[count] > answer :
		answer = target -  numbers[count]
	count += count

print(answer)


### FIXED CODE ###

import sys
numbers = []
for line in sys.stdin:
	numbers.append(int(line))

answer = numbers[2] - numbers[1]
tmp_min = numbers[1]
for target in range(2, len(numbers)):
	answer =  max(numbers[target] - tmp_min ,answer)
	tmp_min = min(numbers[target] , tmp_min)

print(answer)
n = int(input())
b_list = []
for i in range(n):
    ba_tmp = list(map(int, input().split()))
    ba_list.append([ba_tmp[1], ba_tmp[0]])
ba_list.sort()
now_time = 0
for i in range(n):
    now_time += ba_list[i][1]
    if now_time > ba_list[i][0]:
        print('No')
        exit()
print('Yes')

### FIXED CODE ###

n = int(input())
ba_list = []
for i in range(n):
    ba_tmp = list(map(int, input().split()))
    ba_list.append(ba_tmp[::-1])
ba_list.sort()
now_time = 0
for i in range(n):
    now_time += ba_list[i][1]
    if now_time > ba_list[i][0]:
        print('No')
        exit()
print('Yes')
#c
n=int( input())
a=[0]*n
b=[0]*n
for i in range(n):
    a[i],b[i] = map(int,input().split() )

d=[[a[i],b[i],a[i]+b[i]] for i in range(n)]
d.sort(reverse=True,key=lambda x:x[2])
print( sum( d[i][0] for i in range((m+1)//2) ) - sum( d[i][1] for i in range((m+1)//2,m))  )

### FIXED CODE ###

n=int( input())
a=[0]*n
b=[0]*n
for i in range(n):
    a[i],b[i] = map(int,input().split() )
c=[[a[i],b[i],a[i]+b[i]] for i in range(n)]
c.sort(reverse=True,key=lambda x:x[2])
tsum=sum(c[i*2][0] for i in range((n+1)//2))
asum=sum(c[i*2+1][1] for i in range(n//2))
print( tsum- asum )
S = ABC

if S = ABC:
 print('ARC')
else:
 print('ABC')

### FIXED CODE ###

s=input()
print("ABC" if s=="ARC" else "ARC")
#入力
A = input()
B = input()

#A,B ＝　数値化　M,m　＝　初期化
A = int(A)
B = int(B)
m = 0

#K探し
m = ( A + B ) / 2

#K判定および表示
if m.is_integer():
    print( '%d' %m)
else :
    print('IMPOSSIBLE')


### FIXED CODE ###

#入力
A = input().split()

#A,B ＝　数値化　M,m　＝　初期化
A[0] = int(A[0])
A[1] = int(A[1])
m = 0

#K探し
m = ( A[0] + A[1] ) / 2

#K判定
if m.is_integer():
    print( '%d' %m)
else :
    print('IMPOSSIBLE')
import numpy as np

N = int(input())
vn_list = input().split()

vn = np.array(vn_list, dtype="float")
w = np.geomspace(1/2, 1/(2**N), num=N)
w[N-1] = w[N-2]
result = np.dot(vn, w)
print(result)

### FIXED CODE ###

import numpy as np

N = int(input())
vn_list = input().split()

vn = np.sort(np.array(vn_list, dtype="float"))[::-1]
w = np.logspace(1, N, base=1/2, num = N)
w[N-1] = w[N-2]
result = np.dot(vn, w)
print(result)
from math import gcd

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

gcd_from_right = [0] * N
gcd_from_right[-1] = A[-1]
for i in reversed(range(N-1)):
    gcd_from_right[i] = gcd(A[i], gcd_from_right[i+1])

ans = gcd_from_right[1]
gcd_from_left = A[0]
for i in range(1, N-1):
    ans = max(ans, gcd(gcd_from_left, gcd_from_right[i+1]))
    gcd_from_left = gcd(gcd_from_left, A[i])
ans = max(ans, gcd_from_left)
print(ans)


### FIXED CODE ###

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


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

gcd_from_right = [0] * N
gcd_from_right[-1] = A[-1]
for i in reversed(range(N-1)):
    gcd_from_right[i] = gcd(A[i], gcd_from_right[i+1])

ans = gcd_from_right[1]
gcd_from_left = A[0]
for i in range(1, N-1):
    ans = max(ans, gcd(gcd_from_left, gcd_from_right[i+1]))
    gcd_from_left = gcd(gcd_from_left, A[i])
ans = max(ans, gcd_from_left)
print(ans)
def main():
    n, m = map(int, input().split())
    ab = [list(map(int, input().split())) for i in range(m)]
    res = [0] * n
    for i in ab:
        res[i[0] - 1] += 1
        res[i[1] - 1] += 1
    for i in res:
        print(i)
if __name__ == '__main__':
    main(

### FIXED CODE ###

def main():
    n, m = map(int, input().split())
    ab = [list(map(int, input().split())) for i in range(m)]
    res = [0] * n
    for i in ab:
        res[i[0] - 1] += 1
        res[i[1] - 1] += 1
    for i in res:
        print(i)
if __name__ == '__main__':
    main()
if __name__ == '__main__':
    s = input()
    ss = all_part_string(s)
    o = [e for e in ss if contains_only(e, "ACGT")]
    print(0 if len(sorted(o, key=len, reverse=True)) == 0 else len(sorted(o, key=len, reverse=True)[0]))

### FIXED CODE ###

def all_part_string(s):
    r = range(len(s))
    return [s[i:j+1] for i in r for j in r if s[i:j+1] != '']

def contains_only(s, l):
    return False if [a for a in [e for e in s if e not in l] if a != ''] else True

if __name__ == '__main__':
    s = input()
    ss = all_part_string(s)
    o = [e for e in ss if contains_only(e, "ACGT")]
    print(0 if len(sorted(o, key=len, reverse=True)) == 0 else len(sorted(o, key=len, reverse=True)[0]))
s = str(input())
count = 0
s_len = len(s)
for i in range(s_len - 4):
    for j in range(i + 4, s_len + 1):
        if int(s[i:j]) % 2019 == 0:
            count += 1
print(count)

### FIXED CODE ###

s, w = map(int, input().split())

if s  <= w:
    print('unsafe')
else:
    print('safe')
n = int(input)
a = int(input)
print("Yes") if ((n % 500) <= a) else print("No")

### FIXED CODE ###

x = int(input())
a = int(input())
b = int(input())
print((x - a) % b)
#https://atcoder.jp/contests/abc150/tasks/abc150_a
K= int(input())

X= int(input())

if 500*K<X:
    print("No")
else:
    print("Yes")

### FIXED CODE ###

#https://atcoder.jp/contests/abc150/tasks/abc150_a

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

if 500*K<X:
    print("No")
else:
    print("Yes")
n=int(input())
arr=list(map(int,input().split()))
ans=1
for i in arr:
    if ans*i<=10**18:
        ans*=i
    else:
        print(-1)
        return(0)
print(ans)

### FIXED CODE ###

n=int(input())
arr=list(map(int,input().split()))
ans=1
arr=sorted(arr)
def solve(arr,ans):
    for i in arr:
        ans*=i
        if(ans>10**18):
            return(-1)
        if(ans==0):
            return(0)
    if(ans>10**18):
        return(-1)
    return(ans)
print(solve(arr,ans))
import sys, math

def input(): return sys.stdin.readline()[:-1]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def MATINT(h): return [list(map(int, input().split())) for _ in range(h)]
def MATSTR(h): return [input() for _ in range(h)]
sys.setrecursionlimit(10 ** 9)
inf = float('inf')
mod = 10 ** 9 + 7

A, B, X = MAP()
V = A* A * B - X
if V < X:
    # Y = 2 * vacant / A / A
    ans = 90 - math.degrees(math.atan(A**3 / (2*V)))
else:
    # Y = 2 * X / A / B
    ans = 90 - math.degrees(math.atan(2 * X / (A*B*B)))
print(ans)


### FIXED CODE ###

import sys, math

def input(): return sys.stdin.readline()[:-1]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def MATINT(h): return [list(map(int, input().split())) for _ in range(h)]
def MATSTR(h): return [input() for _ in range(h)]
sys.setrecursionlimit(10 ** 9)
inf = float('inf')
mod = 10 ** 9 + 7

A, B, X = MAP()
V = A* A * B - X

if V < X:
    # Y = 2 * vacant / A / A
    if V > 0:
        ans = 90 - math.degrees(math.atan(A**3 / (2*V)))
    else:
        ans = 0
else:
    # Y = 2 * X / A / B
    ans = 90 - math.degrees(math.atan(2 * X / (A*B*B)))
print(ans)
def dfs(g, seen, n):
    all_seen = True

    for si in seen:
        if si == False:
            all_seen = False

    if all_seen:
        return 1

    ans = 0

    for m in g[n]:
        if seen[m]:
            continue

        seen[m] = True
        ans += dfs(g, seen, m)
        seen[m] = False

    return ans


def main():
    n, m = map(int, stdin.readline().split())
    ab = [map(int, stdin.readline().split()) for _ in range(n)]
    g = [[] for _ in range(n)]
    for abi in ab:
        a, b = abi
        g[a - 1].append(b - 1)
        g[b - 1].append(a - 1)
    seen = [False for _ in range(n)]
    seen[0] = True

    ans = dfs(g, seen, 0)

    print(ans)


if __name__ == "__main__":
    main()


### FIXED CODE ###

from sys import stdin


def dfs(g, seen, n):
    all_seen = True

    for si in seen:
        if si == False:
            all_seen = False

    if all_seen:
        return 1

    ans = 0

    for m in g[n]:
        if seen[m]:
            continue

        seen[m] = True
        ans += dfs(g, seen, m)
        seen[m] = False

    return ans


def main():
    n, m = map(int, stdin.readline().split())
    ab = [map(int, stdin.readline().split()) for _ in range(m)]
    g = [[] for _ in range(n)]
    for abi in ab:
        a, b = abi
        g[a - 1].append(b - 1)
        g[b - 1].append(a - 1)
    seen = [False for _ in range(n)]
    seen[0] = True

    ans = dfs(g, seen, 0)

    print(ans)


if __name__ == "__main__":
    main()
n = int(int, input().split())
machi = []
li_x = []
li_y = []
for i in range(n):
    x, y = map(int, input().split())
    li_x.append((x, i))
    li_y.append((y, i))
    machi.append((x, y, i))
li_x.sort()
li_y.sort()
edge = [[] for _ in range(n)]
for i in range(n-1):
    edge[li_x[i][1]].append((li_x[i+1][0]-li_x[i][0], li_x[i+1][1]))
    edge[li_x[i+1][1]].append((li_x[i+1][0]-li_x[i][0], li_x[i][1]))
    edge[li_y[i][1]].append((li_y[i+1][0]-li_y[i][0], li_y[i+1][1]))
    edge[li_y[i+1][1]].append((li_y[i+1][0]-li_y[i][0], li_y[i][1]))

import heapq
def prim_heap(edge, n):
    used = [True] * n # True ：　不使用husiyou
    edgelist = []
    for e in edge[0]:
        heapq.heappush(edgelist, e)
    used[0] = False
    res = 0
    while len(edgelist) != 0:
        minedge = heapq.heappop(edgelist)
        if not used[minedge[1]]:
            continue
        v = minedge[1]
        used[v] = False
        for e in edge[v]:
            if used[e[1]]:
                heapq.heappush(edgelist, e)
        res += minedge[0]
    return res
print(prim_heap(edge, n))

### FIXED CODE ###

n = int(input())
machi = []
li_x = []
li_y = []
for i in range(n):
    x, y = map(int, input().split())
    li_x.append((x, i))
    li_y.append((y, i))
    machi.append((x, y, i))
li_x.sort()
li_y.sort()
edge = [[] for _ in range(n)]
for i in range(n-1):
    edge[li_x[i][1]].append((li_x[i+1][0]-li_x[i][0], li_x[i+1][1]))
    edge[li_x[i+1][1]].append((li_x[i+1][0]-li_x[i][0], li_x[i][1]))
    edge[li_y[i][1]].append((li_y[i+1][0]-li_y[i][0], li_y[i+1][1]))
    edge[li_y[i+1][1]].append((li_y[i+1][0]-li_y[i][0], li_y[i][1]))

import heapq
def prim_heap(edge, n):
    used = [True] * n # True ：　不使用husiyou
    edgelist = []
    for e in edge[0]:
        heapq.heappush(edgelist, e)
    used[0] = False
    res = 0
    while len(edgelist) != 0:
        minedge = heapq.heappop(edgelist)
        if not used[minedge[1]]:
            continue
        v = minedge[1]
        used[v] = False
        for e in edge[v]:
            if used[e[1]]:
                heapq.heappush(edgelist, e)
        res += minedge[0]
    return res
print(prim_heap(edge, n))
N,A,B = map(int,input().split())
print(min(A*T,B))



### FIXED CODE ###

N,A,B = map(int,input().split())
print(min(A*N,B))
a,b = map(int,raw_input())
if a > b:
    print ("a > b")
elif a == b:
    print ("a == b")
else
    print ("a > b")

### FIXED CODE ###

a, b = map(int, raw_input().split())

if a>b:
  print "a > b"
if a<b:
  print "a < b"
if a==b:
  print "a == b"
print((int(input())+int(input())+1)//2)

### FIXED CODE ###

a, b = map(int, input().split())
print((a + b + 1) // 2)
a,b,c,d=map(int, input().split())
print(min(a,b)+min(c,d))

### FIXED CODE ###

a = [int(input()) for i in range(4)]
print(min(a[0], a[1])+min(a[2], a[3]))
n, k = map(int, input().split())
a = list(map(int, input().split()))
mod = 10 ** 9 + 7

if max(a) < 0:
    a.sort()
    ans = 1
    if k % 2 == 0:
        for e in a[:k]:
            ans *= e
            ans %= mod
    else:
        for e in a[-k:]:
            ans *= e
            ans %= mod

    print(ans)

else:
    neg = []
    pos = []
    for e in a:
        if e < 0:
            neg.append(e)
        else:
            pos.append(e)

    neg.sort()
    pos.sort(reverse=True)

    ans = 1
    if k % 2:
        ans *= pos.pop(0)
        k -= 1

    nums = [e1 * e2 for e1, e2 in zip(neg[::2], neg[1::2])]
    nums += [e1 * e2 for e1, e2 in zip(pos[::2], pos[1::2])]
    if len(neg) % 2:
        nums += neg[-1]
    if len(pos) % 2:
        nums += pos[-1]

    nums.sort(reverse=True)
    for e in nums[:k//2]:
        ans *= e
        ans %= mod

    print(ans)


### FIXED CODE ###

n, k = map(int, input().split())
a = list(map(int, input().split()))
mod = 10 ** 9 + 7

if max(a) < 0:
    a.sort()
    ans = 1
    if k % 2 == 0:
        for e in a[:k]:
            ans *= e
            ans %= mod
    else:
        for e in a[-k:]:
            ans *= e
            ans %= mod

    print(ans)

elif k == n:
    ans = 1
    for e in a:
        ans *= e
        ans %= mod

    print(ans)

else:
    neg = []
    pos = []
    for e in a:
        if e < 0:
            neg.append(e)
        else:
            pos.append(e)

    neg.sort()
    pos.sort(reverse=True)

    ans = 1
    if k % 2:
        ans *= pos.pop(0)
        k -= 1

    nums = [e1 * e2 for e1, e2 in zip(neg[::2], neg[1::2])]
    nums += [e1 * e2 for e1, e2 in zip(pos[::2], pos[1::2])]

    nums.sort(reverse=True)
    for e in nums[:k//2]:
        ans *= e
        ans %= mod

    print(ans)
N, M = map(int, input().split())
path = [[] for _ in range(N)]
for _ in range(M):
  x, y = map(int, input().split())
  x, y = x-1, y-1
  path[x].append(y)

# ノードからの最大移動回数をメモ
dp = [-1] * N

def dfs(v, dist):
  for nv in path[v]:
    dp[v] = max(dfs(nv, dist+1),dp[v])
  return dist

for i in range(N):
  if dp[i] < 0:
    dp[i] = dfs(i, 0)
  
print(max(dp))


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**9)

N, M = map(int, input().split())
path = [[] for _ in range(N)]
for _ in range(M):
    x, y = map(int, input().split())
    x, y = x-1, y-1
    path[x].append(y)

dp = [-1] * N
def dfs(v):
    if dp[v] > -1:
        return dp[v] + 1
    ret = 0
    for i in path[v]:
        ret = max(ret, dfs(i))
    dp[v] = ret
    return ret + 1


for i in range(N):
    if dp[i] < 0:
        dfs(i)

print(max(dp))
n = int(raw_input())
s = str(raw_input())
k=n/2
if s[0:h] == s[h:n]:
    print 'Yes'
else:
    print 'No'


### FIXED CODE ###

r=int(input())
print(r*r)
n = input()
lst = map(int,raw_input().split())
print ' '.join(lst[::-1])

### FIXED CODE ###

n = input()
lst = map(int,raw_input().split())
while n>0:
	n -= 1
	print lst[n],
a, b = input().split(' ')

if a * b % 2 == 0:
  print(Even)
else:
  print(Odd)

### FIXED CODE ###

list = input().split()
a = int(list[0])
b = int(list[1])

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

print(a[1],a[0])

### FIXED CODE ###

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

print(a[1] + a[0])
def gcd(a, b):
    if a < b:
        a, b = b, a
    if b == 0:
        return a
    else:
        return int(gcd(b, a%b))

def lcm(a, b):
    return int(a / gcd(a, b) * b)

N = input()
V = 1
for i in range(int(N)):
    T = input()
    V = lcm(V, int(T))

print("%d" % V)

### FIXED CODE ###

def gcd(a, b):
    if a < b:
        a, b = b, a
    if b == 0:
        return a
    else:
        return gcd(b, a%b)

def lcm(a, b):
    return a // gcd(a, b) * b

N = input()
V = 1
for i in range(int(N)):
    T = input()
    V = lcm(V, int(T))

print(V)
import sys
sys.setrecursionlimit(100000)
n,m=map(int,input().split())
al=[int(input()) for i in range(m)]
mod=1000000007
ms=[0]*n

def dd(n):
    if ms[n-1]>0:
        return ms[n-1]
    if n==1:
        ms[n-1]=1
        return 1
    if n==2:
        ms[n-1]=2
        return 2
    m=dd(n-1)+dd(n-2)
    ms[n-1]=m
    return m

ans=1
now=0
b=-1
for a in al:
    if a-1==b:
        print(0)
        exit()
    b=a
    if a-1!=now:
        ans=(ans%mod)*(dd(a-now-1)%mod)%mod
    now=a+1

ans=(ans%mod)*(dd(n-al[-1]-1)%mod)%mod
print(ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)
n,m=map(int,input().split())
al=[int(input()) for i in range(m)]+[n+1]
mod=1000000007
ms=[0]*(n+1)

def dd(n):
    if ms[n]>0:
        return ms[n]
    if n==1:
        ms[n]=1
        return 1
    if n==2:
        ms[n]=2
        return 2
    m=dd(n-1)+dd(n-2)
    ms[n]=m
    return m

ans=1
now=0
b=-1
for a in al:
    if a-1==b:
        print(0)
        exit()
    b=a
    if a-1!=now:
        ans=(ans%mod)*(dd(a-now-1)%mod)%mod
    now=a+1

print(ans)
n = int(input())
di = [list(map(int, input().split(' '))) for _ in range(n)]
di.sort(reverse = True)
result = []
for i in range(n-1):
    result.append([di[i][0]-di[i+1][0], di[i][1]-di[i+1][1]])
result.sort()
counter = []
z = 1
c = 1
hantei = result[0]
while z <= n-1:
    if z < n-1:
        if hantei == result[z]:
            c += 1
            z += 1
        else:
            counter.append(c)
            c = 1
            hantei = result[z]
            z += 1
    else:
        counter.append(c)
        z += 1
print(n-max(counter))

### FIXED CODE ###

#from collections import defaultdict
n = int(input())
di = [list(map(int, input().split(' '))) for _ in range(n)]
result = {0:0}
#md = defaultdict(int)
for i in range(n):
    for j in range(n):
        if i == j:
            continue
        else:
            p = di[i][0] - di[j][0]
            q = di[i][1] - di[j][1]
            result[(p,q)] = result.get((p,q), 0)+1
            #md[(p,q)] += 1
#print(result)
print(n - max(result.values()))
#print(md)
#print(n - max(md.values()))
import sys

def main():
    stdin = sys.stdin
    n, m = map(int, stdin.readline().split())

    par = [i for i in range(i)]
    size = [1] * n
    rank = [1] * n

    def find(x, par):
        if par[x] == x:
            return x
        else:
            return find(par[x], par)

    def unite(x, y):
        x = find(x)
        y = find(y)

        if x != y:
            # xとyの属している集合が異なる時
            if rank[x] < rank[y]:
                par[x] = y
                size[y] += size[x]
            else:
                par[y] = x
                size[x] += size[y]
                if rank[x] == rank[y]:
                    rank[x] += 1

    for _ in range(m):
        a, b = map(int, stdin.readline().split())
        unite(a, b, par, rank)


    print(max(size))

if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys

def main():
    stdin = sys.stdin
    n, m = map(int, stdin.readline().split())

    par = [i for i in range(n)]
    size = [1] * n
    rank = [1] * n

    def find(x, par):
        if par[x] == x:
            return x
        else:
            return find(par[x], par)

    def unite(x, y):
        x = find(x, par)
        y = find(y, par)

        if x != y:
            # xとyの属している集合が異なる時
            if rank[x] < rank[y]:
                par[x] = y
                size[y] += size[x]
            else:
                par[y] = x
                size[x] += size[y]
                if rank[x] == rank[y]:
                    rank[x] += 1

    for _ in range(m):
        a, b = map(int, stdin.readline().split())
        unite(a-1, b-1)


    print(max(size))

if __name__ == '__main__':
    main()
a = int(input())
blue = []
count = []
for i in range(a)
    x = input()
    if x in blue:
        count[blue.index(x)] += 1
    else:
        blue.append(x)
        count.append(1)
b = int(input())
for i in range(b)
    x = input()
    if x in blue:
        count[blue.index(x)] -= 1
    else:
        blue.append(x)
        count.append(-1)

blue.sorted()
if blue[0] < 0:
    print("0")
else:
    print (blue[0])

### FIXED CODE ###

a = int(input())
blue = []
count = []
for i in range(a):
    x = input()
    if x in blue:
        count[blue.index(x)] += 1
    else:
        blue.append(x)
        count.append(1)
b = int(input())
for i in range(b):
    x = input()
    if x in blue:
        count[blue.index(x)] -= 1
    else:
        blue.append(x)
        count.append(-1)

count.sort()
count.reverse()
if count[0] < 0:
    print("0")
else:
    print (count[0])
if x >= a and x-a <= b:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

a, b, x = map(int, input().split())
if x >= a and x-a <= b:
    print("YES")
else:
    print("NO")
import sys
from collections import deque, defaultdict
import copy
import bisect
#input=sys.stdin.readline
#sys.setrecursionlimit(10 ** 9)
import math
import heapq

S = input()

RL = []
for i in range(len(S) - 1):
	if S[i] == 'R' and S[i + 1] == 'L':
		RL.append(i)
dist = [0]*len(S)
X = [0]*len(S)
for i in range(len(S)):
	if S[i] == 'R':
		loc = bisect.bisect_left(RL, i)
		dist[i] = RL[loc] - i
		X[i] = RL[loc]
	else:
		loc = bisect.bisect_left(RL, i)
		dist[i] = i - RL[loc - 1] - 1
		X[i] = RL[loc - 1] + 1

num = [0]*len(S)
for i in range(len(S)):
	if S[i] == 'R':
		num[X[i] + ((dist[i])%2)] += 1

	else:
		num[X[i] - ((dist[i])%2)] += 1


for i in range(len(S)):
	print(num[i], end='')
	print(" ", end ="")

### FIXED CODE ###

A, B, C = list(map(int, input().split()))
print(max(0, C - (A - B)))
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
time = 0
timeyosou = abs(B-A)/(V-W)

if (V <= W):
    if (A < B):
        time = (10**9-A)/V
    else:
        time = (10**9+A)/V
else:
    if (A < B):
        if ((10**9 - B)/W > timeyosou):
           time = timeyosou
        else:
            time = (10**9 - A)/V
    if (A > B):
        if ((10**9 + B)/W > timeyosou):
           time = timeyosou
        else:
            time = (10**9 + A)/V
if (T > time):
    print ("YES")
else:
    print("NO")


### FIXED CODE ###

A, V = map(int,input().split())
B, W = map(int,input().split())
T = int(input())
if (V <= W):
    print("NO")
elif(T < abs(A - B)/(V-W)):
    print("NO")
else:
    print("YES")