Harryxun/stf_run huggingface dataset:
x,a,b = map(int,input())
if abs(a-x) > abs(b-x):
    print("A")
else:
    print("B")

### FIXED CODE ###

x,a,b = map(int,input().split())
if abs(a-x) > abs(b-x):
    print("B")
else:
    print("A")
mod=10**9+7
n,k=map(int,input().split())
arr=list(map(int,input().split()))
cnt_plus=0
cnt_zero=0
cnt_minus=0
arr_plus=[]
arr_minus=[]
for i in range(n):
  if arr[i]>0:
    cnt_plus+=1
    arr_plus.append(arr[i])
  elif arr[i]<0:
    cnt_minus+=1
    arr_minus.append(-arr[i])
  else:
    cnt_zero+=1
if cnt_plus+cnt_minus<k:
  print(0)
  exit()
if cnt_plus==0 and k%2==1:
  arr_minus=sorted(arr_minus)
  tmp=1
  for i in range(k):
    tmp*=arr_minus[i]
    tmp%=mod
  print((-tmp)%mod)
else:
  arr_plus=sorted(arr_plus,reverse=True)
  arr_minus=sorted(arr_minus,reverse=True)
  acum_plus=[1]
  for i in range(len(arr_plus)):
    acum_plus.append((acum_plus[-1]*arr_plus[i])%mod)
  acum_minus=[1]  
  for i in range(len(arr_minus)):
    acum_minus.append((acum_minus[-1]*arr_minus[i])%mod)  
  if k%2==0:
    ans=0
    for i in range(0,len(arr_plus)+1,2):
      j=k-i
      if len(arr_minus)<j:
        continue
      ans=max(ans,(acum_plus[i]*acum_minus[j])%mod)
    print(ans)
  else:
    ans=0
    for i in range(1,len(arr_plus)+1,2):
      j=k-i
      if len(arr_minus)<j:
        continue
      ans=max(ans,(acum_plus[i]*acum_minus[j])%mod)
    print(ans)

### FIXED CODE ###

import heapq
 
mod=10**9+7
n,k=map(int,input().split())
arr=list(map(int,input().split()))
q=[]
cnt_plus=0
for i in range(n):
  if arr[i]>0:
    cnt_plus+=1
    heapq.heappush(q,(-arr[i],1))
  elif arr[i]<0:
    heapq.heappush(q,(arr[i],-1))
  else:
    heapq.heappush(q,(0,0))
pick=[]
prev_plus=0
prev_minus=0
cnt=0
for i in range(k):
  tmp,flag=heapq.heappop(q)
  tmp*=-1
  if flag==0:
    print(0)
    exit()
  if flag==1:
    pick.append(tmp)
    prev_plus=tmp
  if flag==-1:
    if cnt==0:
      prev_minus=tmp
      cnt+=1
    else:
      cnt=0
      pick.append(prev_minus)
      pick.append(tmp)
if cnt==0:
  ans=1
  for i in range(k):
    ans*=pick[i]
    ans%=mod
  print(ans%mod)
else:
  cand_plus=0
  cand_minus=0
  while len(q)!=0:
    tmp,flag=heapq.heappop(q)
    tmp*=-1
    if flag==1 and cand_plus==0:
      cand_plus=tmp
    if flag==-1 and cand_minus==0:
      cand_minus=tmp
  if (k%2==1 and cnt_plus==0) or (cand_plus==0 and cand_minus==0):
    if arr.count(0)!=0:
      print(0)
      exit()
    else:
      q=[]
      for i in range(n):
        heapq.heappush(q,abs(arr[i]))
      ans=1
      for _ in range(k):
        ans*=heapq.heappop(q)
        ans%=mod
      print((-ans)%mod)
  else:
    if prev_plus*cand_plus>=prev_minus*cand_minus:
      pick.append(cand_plus)
    else:
      if prev_plus!=0:
        pick.remove(prev_plus)
        pick.append(prev_minus)
        pick.append(cand_minus)
      else:
        pick.append(cand_plus)
    ans=1
    for i in range(k):
      ans*=pick[i]
      ans%=mod
    print(ans%mod)
n, x, t = map(int, input().plist())
if n%x==0:
  print(((math.floot(n/x))+1)*t)
else print(n*t/x)

### FIXED CODE ###

n, x, t = map(int, input().split())
if n%x==0:
  print((n//x)*t)
else:
  print( ((n//x)+1)*t )
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N, T = map(int, readline().split())

AB= list(map(int, read().split()))
A = AB[0::2]
B = AB[1::2]
ls = list(zip(A, B))
# 食べるのにかかる時間で昇順にソート
ls.sort()
# 上の並び順において、ls[i:]の美味しさの最大値をdeli[i]とする
# deli = [0]*N
# deli[- 1] = ls[-1][- 1]
deli = [ls[- 1][- 1]]
for i in range(N - 2, - 1, - 1):
    #deli[i] = max(deli[i - 1], ls[i][- 1])
    deli.append(max(deli[i - 1], ls[i][- 1]))
    
deli = deli[::- 1]

res = 0
dp = [0]*T
for i in range(N - 1):
    for j in range(T - 1, - 1, - 1):
        if ls[i][0] <= j:
            dp[j] = max(dp[j], dp[j - ls[i][0]] + ls[i][1])
    res = max(res, dp[- 1] + deli[i + 1])
print(res)

### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N, T = map(int, readline().split())

AB= list(map(int, read().split()))
A = AB[0::2]
B = AB[1::2]
ls = list(zip(A, B))
# 食べるのにかかる時間で昇順にソート
ls.sort()
# 上の並び順において、ls[i:]の美味しさの最大値をdeli[i]とする
deli = [0]*N
deli[- 1] = ls[-1][- 1]
for i in range(N - 2, - 1, - 1):
    deli[i] = max(deli[i - 1], ls[i][- 1])

res = 0
dp = [0]*T
for i in range(N - 1):
    for j in range(T - 1, - 1, - 1):
        if ls[i][0] <= j:
            dp[j] = max(dp[j], dp[j - ls[i][0]] + ls[i][1])
    res = max(res, dp[- 1] + deli[i + 1])
print(res)
from sys import stdin, setrecursionlimit

setrecursionlimit(20000)

n, q = [int(x) for x in input().split()]

tree = [[] for _ in range(n + 1)]
cnt = [0] * (n + 1)

for _ in range(n - 1):
    a, b = [int(x) for x in stdin.readline().split()]
    tree[a].append(b)

def walk(p, x):
    cnt[p] += x
    for n in tree[p]:
        walk(n, x)

for _ in range(q):
    p, x = [int(x) for x in stdin.readline().split()]
    walk(p, x)

for i in range(1, n + 1):
    print(cnt[i], end=" ")


### FIXED CODE ###

from sys import stdin, setrecursionlimit

setrecursionlimit(1000000)


def main():
    def read_tree(n):
        parents = [0 for _ in range(n + 1)]
        for _ in range(n - 1):
            a, b = [int(x) for x in input().split()]
            parents[b] = a
        return parents

    n, q = [int(x) for x in input().split()]

    parents = read_tree(n)
    cnt = [0] * (n + 1)

    for _ in range(q):
        p, x = [int(x) for x in input().split()]
        cnt[p] += x
    
    for i in range(1, n + 1):
        cnt[i] += cnt[parents[i]]

    for i in range(1, n + 1):
        print(cnt[i], end=" ")


main()
a, b, k = map(int, input().split()) 

if a==1 or b==1 or k==1:
	print(1)
	exit()

divisorA = [ i for i in range(1,a ) if a % i == 0 ]
divisorB = [ i for i in range(1,b ) if b % i == 0 ]

divisor = set(divisorA + divisorB)

divisor = sorted(divisor &  set(divisorA) )

print( divisor[k-1] )

### FIXED CODE ###

a, b, k = map(int, input().split()) 

divisorA = [ i for i in range(1,a+1 ) if a % i == 0 ]
divisorB = [ i for i in range(1,b+1 ) if b % i == 0 ]

divisor = []

for elemA in divisorA:
	divisor += filter(lambda elem: elem == elemA, divisorB)	

divisor = sorted(divisor)
divisor = divisor[::-1]
# print(divisor)

print( divisor[k-1] )
S = input()
list = []
counter = 0
H = []
c = []
d = 0
j=0
for i in range(len(S)):
    if S[i] == 'A' or S[i] == 'T' or S[i] == 'G' or S[i] == 'C':
        j=0
    else:
        H.append(i)
for i in range(len(H)-1):
    d = H[i+1]-H[i]-1
    c.append(d)
c.append(H[0])
print(max(c))

### FIXED CODE ###

s=list(input())
cnt=0
ans=0
l=list("ATCG")
 
for i in s:
    if i in l:
        cnt+=1
        ans=max(ans,cnt)
    else:
        cnt=0
print(ans)
n,x=map(int,input().split())
for i in range(n+1):
  for j in range(n-i+1):
    if x==10000*i+5000*j+1000*(n-i-j):
      h=[i,j,n-i-j]
      a=h.replace(","," ")
      print(a)
      exit()
    
    
print("-1 -1 -1")

### FIXED CODE ###

n,x=map(int,input().split())
for i in range(n+1):
  for j in range(n-i+1):
    if x==10000*i+5000*j+1000*(n-i-j):
      print(i,j,n-i-j)
      exit()
    
    
print("-1 -1 -1")
while 1:
   H, W = map(int, raw_input().split())
     
   if H == 0 and W == 0:
      break
   for i in range(H):
      if i%2 ==1:
         if W%2 == 1:
            print ".#"*(w/2)+"."
         elif W%2 == 0:
            print ".#"*(W/2)
   elif i%2 == 0:
         if W%2 == 1:
            print "#."*(w/2)+"#"
         elif W%2 == 0:
            print "#."*(W/2)
   print ""

### FIXED CODE ###

while 1:
   H, W = map(int, raw_input().split())
           
   if H == 0 and W == 0:
      break
   for i in range(H):
      if i%2 == 0:
         if W%2 == 0:
            print "#."*(W/2)
         elif W%2 == 1:
            print "#."*(W/2)+"#"
      elif i%2 == 1:
         if W%2 == 0:
            print ".#"*(W/2)
         elif W%2 == 1:
            print ".#"*(W/2)+"."
   print ""
#a,b,c = map(int,input().split())
a = input()
b = input()
print(6-a-b)


### FIXED CODE ###

#a,b,c = map(int,input().split())
a = int(input())
b = int(input())
print(6-a-b)
import collections

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

input_dict = collections.OrderedDict()

for _ in range(n):
    a, b = list(map(int, input().split()))
    input_dict[a] = b

t = min([value for key, value in input_dict.items() if key <= T])

ans = [i for i, x in enumerate(input_dict.values()) if x == t]

if ans is []:
    print('TLE')

else:
    print(list(input_dict.keys()).index(ans))

### FIXED CODE ###

def abc112_b():
    n, limit_time = map(int, input().split())
    ans = 10000

    for _ in range(n):
        cost, time = map(int, input().split())

        if time <= limit_time and ans > cost:
            ans = cost

    return ans if ans != 10000 else "TLE"


if __name__ == '__main__':
    print(abc112_b())
N = int(input())
K = int(input())
x = [int(i) for i in input().split()]

ans = 0
for xi in x:
    if xi < K/2:
        ans += xi*2
    else:
        ans += (K-xi)*2
print(ans)

### FIXED CODE ###

N = int(input())
A = int(input())
print(N**2 - A)
K = input()

S = int(input())

if len(K) <= S:
    print(K)


else:
    print(K[:S] + "...")


### FIXED CODE ###

K = int(input())
S = input()
if len(str(S)) <= K:
    print(S)
else:
    print(S[:K]+'...')
n = int(input())
S = []
H = []
C = []
D = []
for i in range(0, n):
 x = list(input().split())
 if x[0] == 'S':
  S.append(int(x[1]))
 elif x[0] == 'H':
  H.append(int(x[1]))
 elif x[0] == 'C':
  C.append(int(x[1]))
 else:
  D.append(int(x[1]))
def print(list, type):
 list.sort()
 for i in range(1, 14):
  if i not in list:
   print("{0} {1}".format(type, i))
   print()
print(S, 'S')
print(H, 'H')
print(C, 'C')
print(D, 'D')
 

### FIXED CODE ###

n = int(input())
S = []
H = []
C = []
D = []
for i in range(0, n):
 x = list(input().split())
 if x[0] == 'S':
  S.append(int(x[1]))
 elif x[0] == 'H':
  H.append(int(x[1]))
 elif x[0] == 'C':
  C.append(int(x[1]))
 else:
  D.append(int(x[1]))
def pr(list, type):
 list.sort()
 for i in range(1, 14):
  if i not in list:
   print("{0} {1}".format(type, i))
pr(S, 'S')
pr(H, 'H')
pr(C, 'C')
pr(D, 'D')
N, K = map(int, input().split())
A = list(map(int, input().split()))
ans = 0
S = [0] * (N+1)
T = [0] * (N+1)
for i in range(N):
    S[i+1] = (S[i] + A[i])%K
    T[i+1] = (S[i+1] - (i+1))%K
rest = [0] * K
for i in range(N+1):
    if i < K:
        ans += rest[T[i]]
        rest[T[i]] += 1
    else:
        rest[T[i-K]] -= 1
        ans += rest[T[i]]
        rest[T[i]] += 1
print(ans)

### FIXED CODE ###

from collections import defaultdict
N, K = map(int, input().split())
A = list(map(int, input().split()))
ans = 0
S = [0] * (N+1)
T = [0] * (N+1)
for i in range(N):
    S[i+1] = (S[i] + A[i])%K
    T[i+1] = (S[i+1] - (i+1))%K
rest = defaultdict(int)
for i in range(N+1):
    if i < K:
        ans += rest[T[i]]
        rest[T[i]] += 1
    else:
        rest[T[i-K]] -= 1
        ans += rest[T[i]]
        rest[T[i]] += 1
print(ans)
N = int(input())
A1 = [[int(i) for i in input().split(" ")], [int(i) for i in input().split(" ")]]

sum_point = A1[0][0] + A1[1][N - 1]
for i in range(N):
    if sum(A1[0][i + 1:]) <= sum(A1[1][i: N - 1]):
        sum_point += sum(A1[1][i: N - 1])
        break
    else:
        sum_point += A1[0][i + 1]

print(sum_point)

### FIXED CODE ###

x = int(input())
a = int(input())
b = int(input())

print((x - a) % b)
import sys
#sys.setrecursionlimit(10**9)
input = sys.stdin.readline

n, k = map(int, input().split())
A = list(map(int, input().split()))
A.sort()

t = n*(n-1)//2

import bisect
import math
def ok(x):
    # x以上になる組み合わせがt-k+1個以上ある
    cnt = 0
    for a in A:
        if a > 0:
            b = math.ceil(x/a)
            c = n - bisect.bisect_left(A, b)
            if a*a >= x:
                c -= 1
        elif a == 0:
            if x <= 0:
                c = n-1
        else:
            b = math.floor(x/a)
            c = bisect.bisect_right(A, b)
            if a*a >= x:
                c -= 1
        cnt += c
    cnt //= 2
    if cnt >= t-k+1:
        return True
    else:
        return False

l = -10**18-1
r = 10**18+1
while l+1 < r:
    c = (l+r)//2
    if ok(c):
        l = c
    else:
        r = c
print(l)


### FIXED CODE ###

import sys
#sys.setrecursionlimit(10**9)
input = sys.stdin.readline

import numpy as np

n, k = map(int, input().split())
A = np.array(input().split(), np.int64)
A = np.sort(A)

P = A[A>0]
Z = A[A==0]
N = A[A<0]

#t = n*(n-1)//2

def ok(x):
    # x以下になる組み合わせがk個以上
    cnt = 0
    #cnt += np.searchsorted(A, np.ceil(x/P), side='right').sum()
    cnt += np.searchsorted(A, x//P, side='right').sum()
    #cnt += n-np.searchsorted(A, np.floor(x/N), side='left').sum()
    cnt += (n-np.searchsorted(A, (-x-1)//(-N), side='right')).sum()
    if x >= 0:
        cnt += len(Z)*n
    cnt -= np.count_nonzero(A*A <= x)
    cnt = cnt//2
    if cnt >= k:
        return True
    else:
        return False

l = -10**18-1
r = 10**18+1
while l+1 < r:
    c = (l+r)//2
    if ok(c):
        r = c
    else:
        l = c
print(r)
a, b = map(int, input().split())
if (a*b) % 2:
    print("Odd")
else:
    print("Even")

### FIXED CODE ###

A,B = map(int, input().split())
if A*B%2 == 0:
  print('Even')
else:
  print('Odd')
#At coder 2020/2/9 D
#import numpy as np

# 入力
N,K= map(int, input().split())
p = list(map(int, input().split())) 
#p2 = sorted(p, reverse=True)
#print(p2)
kk=[0] * (N-K+1)
#p=np.array(p)
if N==K:
    kk=sum(p)
else:
    for ii in range(N-K+1):
        kk[ii]=sum(p[ii:K+ii])
kk=max(kk)
K=float(K)
kk=float(kk)
ans=0.5*(kk+K)

print(ans)

### FIXED CODE ###

#At coder 2020/2/9 D
#import numpy as np

# 入力
N,K= map(int, input().split())
p = list(map(int, input().split())) 
#p2 = sorted(p, reverse=True)
#print(p2)
kk=[0] * (N-K+1)
#p=np.array(p)
kk[0]=sum(p[0:K])
for ii in range(1,N-K+1):
    kk[ii]=kk[ii-1]-p[ii-1]+p[K+ii-1]
kk=max(kk)
K=float(K)
kk=float(kk)
ans=0.5*(kk+K)

print(ans)
s = input()

if s=="AAA" or s=="BBB":
  print "No"
else:
  print "Yes"

### FIXED CODE ###

s = input()
 
if s=="AAA" or s=="BBB":
  print("No")
else:
  print("Yes")
N = int(input())
print(N**2-int(input())

### FIXED CODE ###

N = int(input())
A = int(input())
print(N**2-A)
a, b, c = list(map(int, input().split())).sort(reverse=True)
print('Yes' if b - c < a and a < b + c else 'No')

### FIXED CODE ###

a, b, c = list(map(int, input().split()))
print('Yes' if a == b == c and a > 0 else 'No')
n, k = map(int, input().split())
h = list(map(int, input()))
ans = 0
for i in h:
  if i>k:
    ans += 1
print(ans)

### FIXED CODE ###

n, k = map(int, input().split())
h = list(map(int, input().split()))
ans = 0
for i in h:
  if i>=k:
    ans += 1
print(ans)
N = int(input())
L = list(map(int, input().split()))
L.sort()
S = 0
for i in range (0, 2*N+1, 2):
  S += L[i]
print(S)

### FIXED CODE ###

N = int(input())
L = list(map(int, input().split()))
L.sort()
S = 0
for i in range (1, 2*N+1, 2):
  S += L[i-1]
print(S)
#ABC070A
n = input().split()
print("Yes" if (a[-1] == a[0]) else "No")

### FIXED CODE ###

a = input()
print("Yes" if a[0]==a[2] else "No")
N, M = map(int,input().split())
A = list(map(int,input().split()))
A.sort()
bc = []
sum_A = 0
for _ in range(M):
  BC = list(map(int,input().split()))
  for _ in range(BC[0]):
    bc.append(BC[1])
bc.sort(reverse=True)
for i in range(len(bc)):
  if A[i] < bc[i]:
    sum_A += bc[i]
  else:
    sum_A += A[i]
print(sum_A)
  
  

### FIXED CODE ###

N, M = map(int,input().split())
A = list(map(int,input().split()))
A.sort()
bc = []
bc = [list(map(int,input().split())) for _ in range(M)]
bc.sort(key=lambda x:x[1],reverse=True)
ai = 0
for b,c in bc:
  cc = b
  while ai<N and cc >0:
    if A[ai] < c:
      A[ai] = c
      cc -= 1
    ai +=1
    if ai == N:
        break
print(sum(A))
while True:
    (m, f, r) = [int(i) for i in input().split()]
        if m == f == r == -1:
            break

    g = m + f
    if m == -1 or f == -1 or g < 30:
        print('F')
    elif g < 50 or r < 50:
        print('D')
    elif g < 65:
        print('C')
    elif g < 80:
        print('B')
    else:
        print('A')

### FIXED CODE ###

while True:
    (m, f, r) = [int(i) for i in input().split()]
    if m == f == r == -1:
        break
 
    total = m + f
    if m == -1 or f == -1 or total < 30:
        print('F')
    elif total < 50 and r < 50:
        print('D')
    elif total < 65:
        print('C')
    elif total < 80:
        print('B')
    else:
        print('A')
N, Q = map(int, input().split())
tree = [list(map(int, input().split())) for i in range(N-1)]
process =  [list(map(int, input().split())) for i in range(Q)]

def next_node(node_num):
  next_nodes = []
  for edge in tree:
    if edge[0] == node_num:
      next_nodes.append(edge[1])
  return next_nodes
 
def all_nodes(num):
  x = [] 
  add_nodes = next_node(num)
  while add_nodes != []:
    for i in add_nodes:
      add_nodes += next_node(i) 
      x += add_nodes
      add_nodes = []
  return x


def add(score, procedure):
  "procedure = [p, x]"
  score[procedure[0]-1] += procedure[1]
  for n in all_nodes(procedure[0]):
    score[n-1] += procedure[1]
  return score


score = [0]*N
for procedure in process:
  add(score, procedure)
print(score)


### FIXED CODE ###

a = int(input()) 
s = str(input()) 
if a>= 3200: 
  print(s)
else:
  print("red")
# input
N = [int(x) for x in list(input()]

if N[1] == N[2]:
    if N[0] == N[1] or N[2] == N[3]:
        print('Yes')
    else:
        print('No')
else:
    print('No')

### FIXED CODE ###

# input
N = [int(x) for x in list(input())]

if N[1] == N[2]:
    if N[0] == N[1] or N[2] == N[3]:
        print('Yes')
    else:
        print('No')
else:
    print('No')
while 1:
     x, y = map(int, raw_input().split())
     if x == 0 and y == 0:
         break
     elif x > y:
         print "%s %s" % (y,x)
     else:
         print "%s %s" % (x,y)
    

### FIXED CODE ###

while 1:
   x, y = map(int, raw_input().split())
   if x == 0 and y == 0:
      break
   elif x > y:
      print '%s %s' % (y,x)
   else:
      print '%s %s' % (x,y)
/* *>>>>>Anshit_Bhardwaj<<<<<* */
#include <bits/stdc++.h>
#define ll long long
#define f(i, x, n) for(int i = x; i < n; i++)
#define dbg(x) cout << x << endl
#define dbg2(x, y) cout << x << ' ' << y << endl
#define dbg3(x, y, z) cout << x << ' ' << y << ' ' << z << endl
#define mod 1000000007
using namespace std;

int main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    ll a, b;
    double d;
    cin >> a >> d;
    b = d * 100;
    a *= b;
    cout << a / 100 << endl;
}

### FIXED CODE ###

line = input()
line = line.split()
a = int(line[0])
b = float(line[1]) + 0.001
c = int(b * 100)
print((a * c) // 100)
s, t = input().split("\n")

s_l = len(s)
t_l = len(t)

max_count = 0
for i in range(0, s_l - t_l):
  count = 0
  for j in range(0, t_l):
    if s[i+j] == t[j]:
      count += 1
  if count > max_count:
    max_count = count

diff = t_l - max_count
print(diff)

### FIXED CODE ###

s = input()
t = input()

s_l = len(s)
t_l = len(t)

max_count = 0
for i in range(0, s_l - t_l + 1):
  count = 0
  for j in range(0, t_l):
    if s[i+j] == t[j]:
      count += 1
  if count > max_count:
    max_count = count

diff = t_l - max_count
print(diff)
input_str=input()
	# input_str="QWERTYASDFZXCV"
	# input_str="ZABCZ"
	# input_str="HASFJGHOGAKZZFEGA"
	b=0
	e=0
	length=len(input_str)
	for i, s in enumerate(input_str):
		if s=="A":
			b=i
			# print(b)
			break
	for i, s in enumerate(input_str[::-1]):
		if s=="Z":
			e=length-i
			# print(e)
			break
	print(e-b)


### FIXED CODE ###

input_str=input()
# input_str="QWERTYASDFZXCV"
# input_str="ZABCZ"
# input_str="HASFJGHOGAKZZFEGA"
b=0
e=0
length=len(input_str)
for i, s in enumerate(input_str):
	if s=="A":
		b=i
		# print(b)
		break
for i, s in enumerate(input_str[::-1]):
	if s=="Z":
		e=length-i
		# print(e)
		break
print(e-b)
n = int(input())
a = map(int, input.split())
b = map(int, input.split())
c = map(int, input.split())  

former = -10
satisfy = 0
for i in a:
    satisfy += b[i-1]
    if i == former + 1:
        satisfy += c[i-1]
    former = i
print(satisfy)

### FIXED CODE ###

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

former = -10
satisfy = 0
for i in a:
    satisfy += b[i-1]
    if i == former + 1:
        satisfy += c[i-2]
    former = i
print(satisfy)
a = list(map(int(input().split())))
n = len(a)-1
i = 0
for _ in range(len(a)-1):
    temp = a[i]
    a[i] = a[n-1]
    a[n-1] = temp
    n+=1
for  i in a:
         print(i,end=" ")

    

### FIXED CODE ###

a = list(map(int,input().split()))
n = len(a)-1
i = 0
for _ in range(len(a)-1):
    temp = a[i]
    a[i] = a[n-1]
    a[n-1] = temp
    n+=1
for  i in a:
         print(i,end=" ")
N = int(input())
A = list(map(int, input().split()))


def solve(N,A):
    ans = 0
    lis = [0]*(2*10**5)
    for i,a in enumerate(A):
        lis[-a-i]+=1
    for i,a in enumerate(A):
        ans += lis[a-i]
    return ans
print(solve(N,A))

### FIXED CODE ###

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


def solve(N,A):
    ans = 0
    lis = [0]*(2*10**5)
    for i,a in enumerate(A):
        if -a-i >= -2*10**5:
            lis[-a-i]+=1
    for i,a in enumerate(A):
        if a-i < 0:
            ans += lis[a-i]
    return ans
print(solve(N,A))
from math import factorial

def cc(n, r):
    return factorial(n) // (factorial(n - r) * factorial(r))

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

if n == k:
    for i in range(k):
        if i == 0:
            cnt = 1
        else:
            cnt = 0
        print(cnt % (10 ** 9 + 7))

else:
    for i in range(k):
        j = i + 1
        cnt = cc(n-k+1, j) * cc(k-1, j-1)


        print(cnt % (10**9 + 7))

### FIXED CODE ###

from math import factorial

def cc(n, r):
    return factorial(n) // (factorial(n - r) * factorial(r))

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

if n == k:
    for i in range(k):
        if i == 0:
            cnt = 1
        else:
            cnt = 0
        print(cnt % (10 ** 9 + 7))

else:
    for i in range(k):
        j = i + 1
        if j > n-k+1:
            cnt = 0
        else:
            cnt = cc(n-k+1, j) * cc(k-1, j-1)


        print(cnt % (10**9 + 7))
import math
a,b,c,d = map(int, input().split())

count_c = (b // c) - ((a-1) // c)
count_d = (b // d) - ((a-1) // d)
lcm_cd = c * d / math.gcd(c, d)
count_cd = (b // lcm_cd) - ((a-1) // lcm_cd)

print(b - a - int(count_c+count_d-count_cd) + 1)


### FIXED CODE ###

import fractions
a,b,c,d = map(int, input().split())

cnt_c = b // c - (a-1) // c
cnt_d = b // d - (a-1) // d
lcm = c * d // fractions.gcd(c, d)
cnt_cd = b // lcm - (a-1) // lcm

mul = cnt_c + cnt_d - cnt_cd

print(b - a + 1 - mul)
l = input()
m = input()
z = l.split(" ")
M = int(z[1])
N = int(z[0])
C = (1/4M)N
F = m.split(" ")
X = []
for item in F:
  votes = int(item)
  X.append(votes)
  X.sort(reverse==true)
for i in range(M):
  if X[i]<C:
    print("No")
    return
print("Yes")


### FIXED CODE ###

l = input()
m = input()
z = l.split(' ')
M = int(z[1])
N = int(z[0])
F = m.split(' ')
X = []
 
for item in F:
  votes = int(item)
  X.append(votes)

S = sum(X)
C = (S/(4*M))
X.sort(reverse=True)
if X[M-1]<C:
  print("No")
else:
  print("Yes")