Harryxun/stf_run huggingface dataset:
n=int(input())
h=list(map(int,input().split()))
for i in range(n):
  if h[i+1]>h[i]+1:
    print('No')
    exit()
print('Yes')
    

### FIXED CODE ###

n=int(input())
h=list(map(int,input().split()))
for i in range(1,n):
  if h[-i]+1==h[-i-1]:
    h[-i-1]-=1
  elif h[-i]+1<h[-i-1]:
    print('No')
    exit()
print('Yes')
A, B, C, D = map(int, input().split())

Thit = A
Tatk = B
Ahit = C
Aatk = D
win = False

while Thit < 0 or Ahit < 0:
    Ahit = Ahit - Tatk
    if Ahit < 0:
        win = True
        break
    Thit = Thit - Aatk
    if Thit < 0:
        break

if win:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

import math
#数値ひとつ
#I = int(input())
#数値欲しいとき
N, M = map(int, input().split())
#文字欲しいとき
#N = input()
#それをListにしたいとき
#listA = list(N)
#受け取る数が未定かつリストにしたいとき
#list = list(map(int, input().split()))

if N>M:
    print('safe')
else:
    print('unsafe')
N = int(input())
arr = tuple(map(int, input().split()))
count = 0

for i in range(0, N + 1, 2):
    if arr[i] % 2 != 0:
        count += 1
        
print(count)


### FIXED CODE ###

N = int(input())
arr = tuple(map(int, input().split()))
count = 0

for i in range(0, N, 2):
    if arr[i] % 2 != 0:
        count += 1
        
print(count)
n = []
while True:
    try:
        n.append(int(raw_input()))
    except:
        break
   
R = max(n)+1
sqrt = int(math.sqrt(r))
p = [1]*R
p[0] = p[1] = 0
i = 2
while i*i <= R:
    if p[i]:
        p[2*i::i] = [0 for x in range(2*i,R,i)]
    i += p[i+1:].index(1)+1
for i in n:
     print sum(p[:i+1])

### FIXED CODE ###

import math
n = []
while True:
    try:
        n.append(int(raw_input()))
    except:
        break
  
r = max(n)+1
sqrt = int(math.sqrt(r))
p = [1]*r
p[0] = 0
p[3::2] = [0 for x in range(3,r,2)]
for i in range(2,sqrt,2):
    if p[i]:
        p[2*i+1::i+1] = [0 for x in range(2*i+1,r,i+1)] 
  
for i in n:
     print sum(p[:i])
if S == 'ABC':
  return 'ARC'
else:
  return 'ABC'

### FIXED CODE ###

S = str(input())
if S == 'ABC':
  print('ARC')
else:
  print('ABC')
n = input()
an = list(map(int, input().split()))
i=0
k=0
 
 

  
while n>i:
  k+=1/an[i]
  i+=1
  
print(1/k)

### FIXED CODE ###

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

  
while n>i:
  k+=1/an[i]
  i+=1
  
print(1/k)
import numpy as np
a,b = map(int,input().split())
print(np.lcm(a,b))

### FIXED CODE ###

a,b = map(int,input().split())
#最大公約数
def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a
#最小公倍数
def lcm(a,b):
    return a*b//gcd(a,b)
print(lcm(a,b))
#https://atcoder.jp/contests/abc093/tasks/arc094_a

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

diff = 3*max(a, b, c) - (a + b + c)

if diff%2 == 1:
    print(diff//2+2)
else:
    pritn(diff//2)


### FIXED CODE ###

#https://atcoder.jp/contests/abc093/tasks/arc094_a

import numpy
data = list(map(int, input().split()))
cost = 0

max_index = numpy.argmax(data)
m = data.pop(max_index)
if abs(data[0]-data[1])%2 == 1:
    cost += 2
cost += (abs(data[0]-data[1])//2 + m - max(data))
print(cost)
a,b = map(raw_input().split())
 
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'
 
elif a < b:
  print 'a < b'
 
else:
  print 'a == b'
X, Y = list(map(int, input().split()))

X = int(X, 16)
Y = int(Y, 16)

if X < Y:
    ans = '<'

elif X > Y:
    ans = '>'

else:
    print('=')


### FIXED CODE ###

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


X = int(X, 16)
Y = int(Y, 16)

if X < Y:
    ans = '<'

elif X > Y:
    ans = '>'

else:
    ans = '='

print(ans)
import math

N = int(input())
X = list(map(int, input().split()))
cen = sorted(X)[-(sorted(int(len(X)/2)))]
sum = 0
all = True
for a in X:
    sum = sum + a
    for c in X:
            all = False
ans = 0
for b in X:
    ans = ans + (b-cen)**2
if all == True:
    ans = 0
    print(ans)
else:
    print(ans)


### FIXED CODE ###

N = int(input())
X = list(map(int, input().split()))
sum = 0
all = True
for a in X:
    sum = sum + a
C = int(sum / N + 0.5)
ans = 0
for b in X:
    ans = ans + (b-C)**2
print(ans)
sa = [s for s in input()]
sb = [s fir s in input()]
sc = [s for s in input()]

next_turn = "a"
flag = True

while flag:
    if next_turn == "a":
        if len(sa) == 0:
            print("A")
            flag = False
        else:
            next_turn = sa.pop(0)
    elif next_tunr == "b":
        if len(sb) == 0:
            print("B")
            flag = false
        else:
            next_turn = sb.pop(0)
    elif next_turn == "c":
        if len(sc) ==0:
            print("C")
            flag = False
        else:
            next_turn = sc.pop(0)
        



### FIXED CODE ###

a = int(input())
b = int(input())
h = int(input())

print((a+b)*h//2)
# https://atcoder.jp/contests/abc070/tasks/abc070_c

import math

# 最小公倍数を求める問題
# 参考：https://note.nkmk.me/python-gcd-lcm/
# 上記リンク先に最大公約数も載ってた

N = int(input())
T = []
for i in range(N):
    T.append(int(input()))


def lcm_base(x, y):
    x_y = x * y
    gcd_xy = math.gcd(x, y)
    ans = int(x_y / gcd_xy)
    return ans

for i in range(1, N):
    T[i] = lcm_base(T[i-1], T[i])

print(T[N - 1])





### FIXED CODE ###

N = int(input())
T = []
for i in range(N):
    T.append(int(input()))

def gcd(x, y):
    if x < y:
        x, y = y, x
    while x % y != 0:
        x, y = y, x % y
    return y


ans = T[0]
for i in range(1, N):
    ans *= T[i] // gcd(ans, T[i])

print(ans)
print("YES" if set(map(int,input().split())).len()==2 else "NO")

### FIXED CODE ###

print("Yes" if len(set(map(int,input().split())))==2 else "No")
import numpy as np 
import collections

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

for i in range(n):
    _a = np.delete(a, i)
    c_dict = collections.Counter(_a)
    total = 0
    for v in c_dict.values():
        if v >= 2:
            total += v * (v - 1) / 2
            
    flag[i] = 1
    print(int(total))

### FIXED CODE ###

import collections

def solve(N, A):
    c_dict = collections.Counter(A)
    originals = [0 for i in range(N + 1)]
    minus = [0 for i in range(N + 1)]
    
    for (k, v) in c_dict.items():
        originals[k] = v * (v - 1) // 2
        minus[k] = ((v * (v - 1)) - (v - 1) * (v - 2)) // 2
        
    total = sum(originals)
    
    ans = []
    for a in A:
        ans.append(str(total - minus[a]))
    return '\n'.join(ans)
    
if __name__ == '__main__':
    N = int(input())
    A = list(map(int, input().split()))
    print(solve(N, A))
import math
from functools import reduce

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

print(reduce(math.gcd, an))

### FIXED CODE ###

from fractions import gcd
from functools import reduce

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

print(reduce(gcd, an))
a=int(input())
s=int(input())
d=int(input())
print(a-s-(a-s)//b*b)

### FIXED CODE ###

a=int(input())
s=int(input())
d=int(input())
print(a-s-(a-s)//d*d)
import sys
W=input()
print(sys.stdin.read().lower().split().count(W)


### FIXED CODE ###

w = input().lower()
r = []
s = input()
while (s != "END_OF_TEXT"):
    r += s.lower().split()
    s = input()
print(len([x for x in r if x == w]))
import sys
a = int(sys.stdin.readline().strip())
b = int(sys.stdin.readline().strip())
c = int(sys.stdin.readline().strip())

if a == 1:
  print("Hello World")
else:
  print(b + c)

### FIXED CODE ###

import sys

a = int(sys.stdin.readline().strip())
if a == 1:
    print("Hello World")
else:
    b = int(sys.stdin.readline().strip())
    c = int(sys.stdin.readline().strip())
    print(b + c)
numpy as np

H, W = map(int, input().split())
a = np.zeros(shape=(H, W), dtype=bool)
for i in range(H):
  a[i] = [s == "." for s in input().split()]

y = [True] * H
for i in range(H):
  if all(a[i,:]):
    y[i] = False

x = [True] * W
for i in range(W):
  if all(a[:,i]):
    x[i] = False

ans = []
for i in range(H):
  if not y[i]:
    continue
  s = ""
  for j in range(W):
    if not x[j]:
      continue
    s = "".join([s, "." if a[i,j] else "#"])
  ans.append(s)

print(*ans, sep="\n")


### FIXED CODE ###

import numpy as np

H, W = map(int, input().split())
a = np.zeros(shape=(H, W), dtype=bool)
for i in range(H):
  a[i] = [s == "." for s in input()]

y = [True] * H
for i in range(H):
  if all(a[i,:]):
    y[i] = False

x = [True] * W
for i in range(W):
  if all(a[:,i]):
    x[i] = False

ans = []
for i in range(H):
  if not y[i]:
    continue
  s = ""
  for j in range(W):
    if not x[j]:
      continue
    s = "".join([s, "." if a[i,j] else "#"])
  ans.append(s)

print(*ans, sep="\n")
N = int(input())
S, T = input().split()
ST = []
for i in range(N):
    ST.append(S[i])
    ST.append(T[i])
print(''.join(ST)

### FIXED CODE ###

N = int(input())
S, T = input().split()
ST = []
for i in range(N):
    ST.append(S[i])
    ST.append(T[i])
print(''.join(ST))
D, N = map(int,input().split())

if(N !=100):
    print((100 ** D) * N)    
else:
    print((100 ** D) * (N + 1)

### FIXED CODE ###

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

if(N !=100):
    print((100 ** D) * N)
else:
    print((100 ** D) * (N + 1))
MOD=10**9+7
N=int(input())
A=list(map(int,input().split()))
bit=[[0]*60 for i in range(N+1)]
for i in range(1,N+1):
    for j in range(60):
        if(A[i-1]>>j&1):
            bit[i][j]=bit[i-1][j]+1
        else:
            bit[i][j]=bit[i-1][j]
res=0
for i in range(N):
    for j in range(60):
        if not (A[i]>>j&1):
            res=(res+(2**j)*bit[i][j])%MOD
        else:
            res=(res+(2**j)*(i-bit[i][j]))%MOD
print(res)

### FIXED CODE ###

A=list(map(int,input().split()))
if(sum(A)>21):
    print("bust")
else:
    print("win")
x, k , d = map(int, input().split())
l = []

ans = 0

if x > 0:
    for i in range(x,-x,-d):
        l.append(i)
        if i < 0:
            break

else:
    for i in range(x,-x,d):
        l.append(i)
        if i > 0:
            break
    

if len(l)-1 > k:
    ans = l[k]
else:
    if len(l)%2 ==0:
        odd = l[len(l)-1]
        even = l[len(l)-2]
    else :
        odd = l[len(l)-2]
        even = l[len(l)-1]
    if k%2 == 0:
        ans = even
    else:
        ans = odd

print(abs(ans))

### FIXED CODE ###

x, k , d = map(int, input().split())

c = x//d

a = x - x//d * d
b = d - abs(a)

if x//d%2 == 0:
    odd = a
    even = b
else:
    odd = b
    even = a

if abs(x//d) > k:
    ans = abs(abs(x) - abs(d*k))
else:
    if k%2 ==0:
        ans = odd
    else:
        ans = even

# print(odd,even)
print(abs(ans))
N,M = map(int,input().split())

ans = [-1] * N

for i in range(M):
    s,c = map(int,input().split())
    if ans[s-1] != -1 and ans[s-1] != c :
        print(-1)
        exit()
    t[s-1] = c

if N != 1 :
    if ans[0] == 0 :
        print(-1)
        exit()
    if ans[0] == -1 :
        ans[0] = 1
    for i in range(N):
        if ans[i] == -1:
            ans[i] = 0
else :
    if ans[0] == -1 :
        ans[0] = 0

print(*ans,sep='')


### FIXED CODE ###

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

ans = [-1] * N

for i in range(M):
    s,c = map(int,input().split())
    if ans[s-1] != -1 and ans[s-1] != c :
        print(-1)
        exit()
    ans[s-1] = c

if N != 1 :
    if ans[0] == 0 :
        print(-1)
        exit()
    if ans[0] == -1 :
        ans[0] = 1
    for i in range(N):
        if ans[i] == -1:
            ans[i] = 0
else :
    if ans[0] == -1 :
        ans[0] = 0

print(*ans,sep='')
count = int(input())
a = [int(input()) for i in range(count)]

a.sort()
for i in range(count):
  print (a[i])

### FIXED CODE ###

a = list(map(int, input().split()))
a.sort()
print(a[0],a[1],a[2])
N,K = input().split()
N = int(N)
K = int(K)

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

count = 0

for i in range(n):
    if h[i] >= K:
        count += 1
    else:
        pass

print(count)




### FIXED CODE ###

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

count = 0

for i in a:
    if i>= k:
        count += 1
print(count)
n,k=map(int,input().split())
li=[int(k) for k in input().split()]
dp=[False]*(n+1)
for i in range(1,k+1):
  for j in range(len(li)):
    if i-li[j]<0:
      dp[i]=False
    else:
      if dp[i-li[j]]==False:
        dp[i]=True
if dp[k]==True:
  print("First")
else:
  print("Second")
  
  

### FIXED CODE ###

n,k=map(int,input().split())
li=[int(k) for k in input().split()]
dp=[False]*(k+1)
for i in range(1,k+1):
  for j in range(len(li)):
    if i-li[j]<0:
      continue
    if dp[i-li[j]]==False:
      dp[i]=True
      break
if dp[k]==True:
  print("First")
else:
  print("Second")
a,b,c＝map(int,input().split())
print(a+b+c-max(a,b,c))

### FIXED CODE ###

a,b,c=map(int,input().split())
print(a+b+c-max(a,b,c))
n,m = (int(x) for x in inpit().split())
N = n *(n -1) /2
M = m *(m-1) / 2
print(N+M)

### FIXED CODE ###

n,m =(int(x) for x in input().split())
N = 0
M = 0
if n >1:
    N = n *(n-1)/2
if m > 1:
    M = m*(m-1)/2
a = int(N + M)
print(a)
n,k=input().split()
s=input()
ans=""
for i in range(n):
  if k+1==i:
    ans+=str.lower(s[i])
  else:
    ans+=s[i]
print(ans)

### FIXED CODE ###

n,k=map(int,input().split())
s=input()
ans=""
for i in range(n):
  if k==i+1:
    ans+=str.lower(s[i])
  else:
    ans+=s[i]
print(ans)
import copy

N, M=map(int, input().split())
A=list(map(int, input().split()))
BC=[]
for _ in range(M):
    BC.append(tuple(map(int, input().split())))
A=sorted(A)
BC=sorted(BC, key=lambda val:val[1], reverse=True)
#print(N,M,A,BC)


change=[]
for bc in BC:
    for _ in range(bc[0]):
        change.append(bc[1])
    if len(change)>=N:
        break
#print(change)


for i in range(len(change)):
    if A[i]>change[i]:
        answer = sum(change[:i]) + sum(A[i:])
        print(answer)
        break
else:
    answer=sum(change[:i+1])+sum(A[i+1:])
    print(answer)


### FIXED CODE ###

import copy

N, M=map(int, input().split())
A=list(map(int, input().split()))
BC=[]
for _ in range(M):
    BC.append(tuple(map(int, input().split())))
A=sorted(A)
BC=sorted(BC, key=lambda val:val[1], reverse=True)
#print(N,M,A,BC)


change=[]
for bc in BC:
    for _ in range(bc[0]):
        change.append(bc[1])
    if len(change)>=N:
        break
#print(change)

if A[0]>=change[0]:
    print(sum(A))
else:
    for i in range(min(N,len(change))):
        if A[i]>change[i]:
            answer = sum(change[:i]) + sum(A[i:])
            print(answer)
            break
    else:
        answer=sum(change[:i+1])+sum(A[i+1:])
        print(answer)
a = ([map(int, input())for _ in range[5]])
k = int(input())
ans="Yay!"
for i in range(1,4):
	if k < a[i]-a[0]:
		ans=":("
print(ans)


### FIXED CODE ###

a = ([int(input())for _ in range(5)])
k = int(input())
ans="Yay!"
for i in range(1,5):
	if k < a[i]-a[0]:
		ans=":("
print(ans)
N, K = map(int, input().split())
x = list(map(int, input().split()))

dist = []
for i in range(N-K+1):
    a = 0
    tmp = x[i:i+K]
    mini, maxi = tmp[0], tmp[-1]
    if (mini >= 0 and maxi >= 0):
        a = maxi
    elif (mini < 0 and maxi < 0):
        a = abs(mixi)
    if mini < 0 and maxi >= 0:
        a = abs(mixi) + maxi + min(abs(mixi), maxi)
    dist.append(a)

print(min(dist))

### FIXED CODE ###

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

dist = []
for i in range(N-K+1): 
    l, r = x[i], x[i+K-1]
    t = min(abs(l)+abs(l-r), abs(r)+abs(r-l))
    dist.append(t)

print(min(dist))
from sortedcontainers import SortedList
import numpy as np

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

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

s = [list(map(int,list(input().split()))) for i in range(m)]

for l in s:
    b, c = l
    min_values = np.array(list(a.pop(0) for i in range(b)))
    min_values = np.array(min_values)
    change_cond = min_values < c
    min_values[change_cond] = c
    a.update(min_values)
a = list(a)
ans = sum(a)
print(ans)


### FIXED CODE ###

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

from collections import defaultdict

cb = defaultdict(int)

for a in input().split():
    cb[int(a)] += 1

for _ in range(m):
    b, c = map(int, input().split())
    cb[c] += b

cbl = sorted(cb.items())

res = n

ans = 0

while res > 0:
    c, b = cbl.pop()
    ncount = min(res, b)
    ans += c * ncount
    res -= ncount

print(ans)
import sys
import math
import itertools as it
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":
    s = S()
    cnt = 0
    tgt = "keyence"
    j = 0
    f = False
    for i in range(len(s)):
        if (s[i] == tgt[j]):
            j += 1
            f = True
        elif f:
            cnt += 1
            f = False
    #print(cnt,j)
    print("Yes" if cnt <= 1 and j == 7 else "No")

### FIXED CODE ###

import sys
import math
import itertools as it
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":
    s = S()
    cnt = 0
    tgt = "keyence"
    for i in range(8):
        if s[:i] + s[len(s)-7+i:] == tgt:
            print("YES")
            exit()
    print("NO")
a=input().split()
b=int(a[0])
c=int(a[1])
a.sorted([0],[1])
if c==0:
  print(b[0],c[0]) 


### FIXED CODE ###

while True :    
    b = list(map(int,input().split()))
    b.sort()
    if b[1]==0:
        break
    print(b[0],b[1])
def resolve():
    x, y, a, b, c = map(int, input().split())
    p = sorted(list(map(int, input().split())))[-x:]
    q = sorted(list(map(int, input().split())))[-y:]
    r = sorted(list(map(int, input().split())), reverse=True)
	p = sorted(p + q)
    for i in range(min(a + b, c)):
        if p[i] < r[i]:
            p[i] = r[i]
        else:
            break
    print(sum(p))


if __name__ == '__main__':
    resolve()


### FIXED CODE ###

import heapq


def resolve():
    x, y, a, b, c = map(int, input().split())
    p = sorted(list(map(int, input().split())))[-x:]
    q = sorted(list(map(int, input().split())))[-y:]
    r = [-int(x) for x in input().split()]
    heapq.heapify(p)
    heapq.heapify(r)
    for i in q:
        heapq.heappush(p, i)
    ans = 0
    while p and r:
        ans += max(heapq.heappop(p), -heapq.heappop(r))
    ans += sum(p)
    print(ans)


if __name__ == '__main__':
    resolve()
n,m,l = map(int,input().split())
A = [list(map(int,input().split())) for i in range(m)]
q = int(input())
S = [list(map(int,input().split())) for i in range(q)]

for i in range(m):
    for j in range(2):
        A[i][j] -= 1
for i in range(q):
    for j in range(2):
        S[i][j] -= 1

B = []
for i in range(m):
    if A[i][2] <= l:
        B.append([A[i][0],A[i][1],A[i][2]])

A = B

# print(S)

M = [[float("inf")] * n for i in range(n)]
for i in range(n):
    M[i][i] = 0
for i in range(m):
    # print(S[i])
    M[A[i][0]][A[i][1]] = A[i][2]
    M[A[i][1]][A[i][0]] = A[i][2]

H = [[0]*n for i in range(n)]
for i in range(n):
    for j in range(n):
        H[i][j] = M[i][j]

N = [[i for i in range(n)] for j in range(n)]

# print(N)

for k in range(n):
    for i in range(n):
        for j in range(n):
            if M[i][j] > M[i][k]+M[k][j]:
                M[i][j] = M[i][k]+M[k][j]
                N[i][j] = N[i][k]

# print(N,M)
def e(i):
    a = S[i][0]
    b = S[i][1]
    c = l
    ans = 0
    end = 0
    while end == 0:
        # print(i,l)
        ne = N[a][b]
        if c < H[a][ne]:
            ans += 1
            c = l
        c -= H[a][ne]
        if c < 0:
            return -1
        if ne == b:
            end = 1
        a = ne
    return ans

for i in range(q):
    print(e(i))


### FIXED CODE ###

n,m,l = map(int,input().split())
A = [list(map(int,input().split())) for i in range(m)]
q = int(input())
S = [list(map(int,input().split())) for i in range(q)]

from scipy.sparse.csgraph import floyd_warshall

for i in range(m):  # ノード番号が1始まりで与えられている場合
    for j in range(2):
        A[i][j] -= 1

for i in range(q):  # ノード番号が1始まりで与えられている場合
    for j in range(2):
        S[i][j] -= 1

M = [[float("inf")] * n for i in range(n)]

for i in range(n):
    M[i][i] = 0

for i in range(m):
    M[A[i][0]][A[i][1]] = A[i][2]
    M[A[i][1]][A[i][0]] = A[i][2]

# for k in range(n):
#     for i in range(n):
#         for j in range(n):
#             M[i][j] = min(M[i][j], M[i][k] + M[k][j])

M = floyd_warshall(M)

for i in range(n):
    for j in range(n):
        M[i][j] = 1 if M[i][j] <= l else float("inf")

for i in range(n):
    M[i][i] = 0

# for k in range(n):
#     for i in range(n):
#         for j in range(n):
#             M[i][j] = min(M[i][j], M[i][k] + M[k][j])

M = floyd_warshall(M)

for i in range(q):
    ans = M[S[i][0]][S[i][1]]-1
    if ans == float("inf"):
        ans = -1
    print(int(ans))
import math
n = int(input())
alist = list(map(int,input().split()))
aalist = alist[:]
mx = 0
for i in range(n):
    alist.pop(i)
    for j in range(1,n-1):
            alist[j] = math.gcd(alist[j], alist[j-1])
    mx = max(mx,alist[n-2])
    alist = aalist[:]
print(mx)

### FIXED CODE ###

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

from fractions import gcd
left = [a[0]]
right = [0]*n
right[-1] = a[-1]

for i in range(1,n):
    left.append(gcd(left[-1], a[i]))

for i in range(n-2,-1,-1):
    right[i] = gcd(a[i], right[i+1])

ans = 0
for i in range(n):
    if i == 0:
        ans = max(ans,right[i+1])
    elif i == n-1:
        ans = max(ans, left[i-1])
    else:
        ans = max(ans, gcd(left[i-1],right[i+1]))

print(ans)
i = iinput().split(' ')

W = int(i[0])
H = int(i[1])
x = int(i[2])
y = int(i[3])
r = int(i[4])

if x - r >= 0 and y - r >= 0 and x + r <= W and y + r <= H:
    print('YES')
else:
    print('NO')

### FIXED CODE ###

W,H,x,y,r=map(int, input().split())
if W >= x+r and 0 <= x+r and H >= y+r and 0 <= y+r and x > 0 and y > 0:
    print("Yes")
else:
    print("No")
n = int(input())
a = input().split()
a_int = list(map(int,a))
col = 400
all_col = 0 
c= [0,0,0,0,0,0,0,0]
for i in range(n):
    if a_int[i] > max_c * col:
        all_col += 1
    else:
        ii = int(a_int[i]/col)
        if c[ii] < 1:
            c[ii] += 1
        
cnt = c.count(1)
min_c = max(cnt, 1)
max_c = min_c + all_col
if max_c > 8:
    max_c -= max_c -8
print(str(min_c)+' ' +str(max_c))

### FIXED CODE ###

from sys import stdin, stdout
def readLine_int_list():return list(map(int, stdin.readline().split()))


def main():
    n = input()
    a = readLine_int_list()

    c = []
    _c = [] 

    for i in a:
        rank = i//400
        if rank > 7:
           _c.append(rank) 
        else:    
            c.append(rank)
    
    
    p = len(set(c))
    print(max(1,p), p+len(_c))

        
if __name__ == "__main__":
    main()
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())

if w >= v:
    print('NO')
else:
    kyori = abs(a-b)
    time = kyori - (v-w)
    if t >= kyori/time:
        print('YES')
    else:
        print('NO')

### FIXED CODE ###

a, v = map(int,input().split())
b, w = map(int,input().split())
t = int(input())
 
 
if (abs(a-b) <= (v- w)*t):
    print('YES')
else:
    print('NO')