peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
n,m = map(int,input().split())
if n == 1 and m == 1:
    print(1)
elif n == 1:
    print(m-2)
elif m == 1:
    print(n-2)
elif n == 2:
    print((m-2)*2)
elif m == 2:
    print((n-2)*2)
else:
    print(n*m-(n*2 + m*2 - 4))
# Judge status: Accepted
n = int(input())
h = []
for _ in range(n):
    h.append(list(map(int, input().split())))

res = h[0]
for i in range(1, n):
    tmp = res[:]
    for j in range(3):
        res[j] = h[i][j] + max(tmp[(j + 1) % 3], tmp[j - 1])
print(max(res))
# Judge status: Wrong Answer
a,b,c=input().split()
print(max(a,b,c)*9+a+b+c)
# Judge status: Accepted
S = list(input())

S_s = set(S)

if len(S) == len(S_s):
    print('yes')
else:
    print('no')
# Judge status: Accepted
import numpy as np

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

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

result = np.zeros([m, n], dtype=np.int64)

cd = []
for i in range(m):
    c, d = map(int, input().split())
    for j, (a, b) in enumerate(ab):
        result[i, j] = abs(a - c) + abs(b - d)

print(*result.argmin(axis=0) + 1, sep="\n")
# Judge status: Accepted
N,M,Q = map(int,input().split())
abcd = [list(map(int,input().split())) for i in range(Q)]

import itertools

A = list(itertools.combinations_with_replacement(range(1,M+1),N))
answer = 0

for i in range(len(A)):
    ans = 0
    for j in range(Q):
        if A[i][ abcd[j][1]-1 ] - A[i][ abcd[j][0]-1 ] == abcd[j][2]:
            ans += abcd[j][3]  
    answer = max(answer,ans)
    
print(answer)
# Judge status: Wrong Answer
x,y ,z= map(int,input().split())
ans=x/z
if ans>=y:
	print('Yes')
else:
	print('No')
# Judge status: Wrong Answer
N,M=map(int,input().split())
MOD=10**9+7
s=1
for i in range(2,N+1):
  s=s*i
t=1
for j in range(2,M+1):
  t=t*j
if N-1==M:
  print((s*t)%MOD)
if N==M-1:
  print((s*t)%MOD)
if N==M:
  print((2*s*t)%MOD)
else:
  print(0)
# Judge status: Accepted
from itertools import *
N,Y = map(int,input().split())
if 10000*N < Y:
  print(-1,-1,-1)
  exit()
for i in range(N):
  for j in range(N-i):
    k = N-i-j
    for xyz in permutations([i,j,k],3):
      x,y,z = xyz
      if 10000*x + 5000*y + 1000*z == Y:
        print(x,y,z)
        exit()
print(-1,-1,-1)
# Judge status: Accepted
s = input()
ans=999
for i in range(len(s)-2):
    ans = min(ans,abs(753-int(s[i:i+3])))
print(ans)
# Judge status: Accepted
L = [2,1]
n = int(input())
for i in range(2,n+1):
  L.append(L[i-1]+L[i-2])
print(L[n])
# Judge status: Accepted
N = input()

if '7' in N:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
N,K = map(int, input().split())
A = list(map(int, input().split()))
print((N+K-3)//(K-1))
# Judge status: Wrong Answer

N = int(input())

robots = []

for i in range(N):
    robots.append(list(map(int, input().split(" "))))

robots.sort()
new = []
for robot in robots:

    if len(new) == 0:
        new.append(robot)
    
    if (new[-1][0] + new[-1][1]) <= (robot[0] - robot[1]):
        new.append(robot)
        continue

print(len(new))
# Judge status: Wrong Answer
import numpy as np

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

AB = np.zeros(0, dtype=int)

for i in range(N):
    a, b = map(int, input().split())
    AB = np.concatenate([AB, np.full(b, a)])

AB = np.sort(AB)

print(AB[:M].sum())
# Judge status: Wrong Answer
import math
in1 = input().split()
A = float(in1[0])
B = float(in1[1])
H = float(in1[2])
M = float(in1[3])
aH = 0.5 * (H * 60 + M)
aM = 6*M
ra = abs(aH-aM)
ra1 = min(360 - ra, ra)
C2 = ((A*A)+(B*B))- (2*(A*B))*(math.cos(math.radians(ra1)))
print(math.sqrt(C2))
print(ra1)
# Judge status: Accepted
a,b,t = map(int, input().split())
print((t // a) * b)
# Judge status: Wrong Answer
N = int(input())
s = input()
t = input()
index = 0
for i in s:
    if i == t[index]:
        index += 1
    else:
        continue
print(s + t[index:])
# Judge status: Wrong Answer
N=input()

if N[0]==N[1]==N[2]:
	print("Yes")
elif N[1]==N[2]==N[3] and N[0]==N[1]==N[2]==N[3]:
	print("Yes")
else:
	print("No")
# Judge status: Accepted
from collections import deque
N,M=map(int,input().split(' '))
chk = [0 for i in range(N+1)]
chk[0]=chk[1]=1
maze = [[] for i in range(N+1)]
for i in range(M):
    a,b=list(map(int,list(input().split(' '))))
    maze[a].append(b)
    maze[b].append(a)
l = deque([1])
while l:
    n = deque.popleft(l)
    for i in maze[n]:
        if not chk[i]:
            chk[i]=n
            l.append(i)
if 0 in chk:
    print('No')
    exit()
print('Yes')
for i in chk[2:]:
    print(i)
# Judge status: Wrong Answer
import itertools
n = int(input())
count = 0
line = [input().split() for i in range(n)]
line = list(itertools.chain.from_iterable(line))

for j in range(len(line)-2):
    if line[j] == line[j+1]:
        if line[j+2] == line[j]:
            count += 1
            print('Yes')
    else:
        continue
if count == 0:
    print('No')
# Judge status: Accepted
k=int(input())
l=list(map(int, input().split(' ')))
a=l[0]
b=l[1]

if (b-a)+1>=k:
    print('OK')
else:
    maybe=(a//k)*k
    ans=False
    while maybe<=b:
        if maybe>=a:
            ans=True
            break
        else:
            maybe+=k
    if ans:
        print('OK')
    else:
        print('NG')
# Judge status: Accepted
a,b = map(int,input().split())

if abs(b-a)%2!=0:
    print("IMPOSSIBLE")
else:
    print((a+b)//2)
# Judge status: Accepted
N=int(input())
A=list(map(int, input().split()))
ans=[0]*N

for i in range(N):
    k=A[i]
    ans[k-1]=i+1

print(*ans , sep=' ')
# Judge status: Wrong Answer
a, b = map(int, input().split())

xa = int(a/0.08)
xb = int(b/0.1)

if xa == xb:
    print(xa)
else:
    if int(xa*0.1) == b:
        print(xa)
    elif int(xb*0.08) == a:
        print(xb)
    else:
        print(-1)
# Judge status: Wrong Answer
n = int(input())
x = sorted(list(map(int, input().split())))

a = x[len(x)//2]
b = x[(len(x)//2) - 1]
for _ in range(len(x)//2):
    print(a)
for _ in range(len(x)//2):
    print(b)
# Judge status: Accepted
N, K = map(int, input().split())
A = list(map(int, input().split()))

l = 0
r = 10 ** 9

while r-l > 1:
  m = (r+l) // 2
  count = 0
  for i in A:
    if i > m:
      count += i // m
      
  if count > K:
    l = m
  else:
    r = m
    
print(r)
# Judge status: Accepted
N = int(input())
c=list(input())
countR = c.count('R')
countW2 = 0
countR2 = 0
for i in range(countR):
    if c[i]=="W":
        countW2 += 1
print(countW2)
# Judge status: Accepted
n=int(input())
s=input()
ans=s.count('.')
cnt=ans

for i in s:
    if i=='.':
        cnt-=1
        ans=min(ans,cnt)
    
    else:
        cnt+=1

ans=min(ans,cnt)


print(ans)
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))

ans, cnt, node = 0, sum(A), 1
for i in range(N + 1):
    ans += node
    cnt -= A[i]
    node = min(cnt, (node - A[i]) * 2)
    if node < 0:
        print(-1)
        break
else:
    print(ans)
# Judge status: Wrong Answer
from collections import Counter
N = int(input())
S = [input() for _ in range(N)]
ans = 0
check_box = []
for s in S:
  s = sorted(s)
  s = ''.join(s)
  check_box.append(s)
C = Counter(check_box)
for i in C:
  if C[i] > 2:
    ans += C[i]
  elif C[i] == 1:
    pass
  else:
    ans += 1
print(ans)
# Judge status: Accepted
(N, T), *D,  = [list(map(int, s.split())) for s in open(0)]

min_cost = 1e10
idx = 0
for i in range(len(D)):
    if T >= D[i][1] and D[i][0] < min_cost:
        idx = i
        min_cost = D[i][0]

if min_cost == 1e10:
    print("TLE")
else:
    print(min_cost)
# Judge status: Accepted
n=int(input())
p=[int(x) for x in input().split()]

result = 0

for i in range(1,n-1):
    buf=[p[i-1],p[i],p[i+1]]
    if sorted(buf).index(p[i]) == 1:
        result+=1

print(result)
# Judge status: Wrong Answer
N, A, B=map(int, input().split())
if N==1:
  if A==B:
    print(A)
  else:
    print(0)
else:
  if A>B:
    print(0)
  else:
    n=N-2
    ans=n*B-n*A+1
    print(ans)
# Judge status: Accepted
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

N, K = MAP()
h = LIST()

INF = 10**23

dp = [INF] * N
dp[0] = 0

for i in range(1, N):
    for j in range(1, K+1):
        if i - j < 0:
            continue
        dp[i] = min(dp[i], dp[i-j] + abs(h[i] - h[i-j]))

print(dp[-1])
# Judge status: Wrong Answer
from fractions import gcd
from functools import reduce


def lcm(x,y):
    return (x*y)//gcd(x,y)


def lcm_list(nums):
    return reduce(lcm,nums,1)


n,m=map(int,input().split())
A=list(map(int,input().split()))
A=[i//2 for i in A]
ans=lcm_list(A)
print((m-ans)//(ans*2)+1)
# Judge status: Wrong Answer
A, B = map(int, input().split())
print(A + B if A + B <= 24 else A + B - 24)
# Judge status: Accepted
nums = map(int, input().split())
nums = sorted(nums)
A, B, C = nums

if A == B and B == C and A % 2 == 0:
    print(-1)
    exit()

count = 0
while True:
    if A % 2 != 0 or B % 2 != 0 or C % 2 != 0:
        print(count)
        exit()

    nA = (B + C) // 2
    nB = (A + C) // 2
    nC = (A + B) // 2
    count += 1
    A, B, C = nA, nB, nC
# Judge status: Wrong Answer
a, b, c, k = map(int, input().split())
s = 0
if  a + b >= k:
    s = a
elif a < k:
    s = a - k
else:
    s = a - (c - b) 
print(s)
# Judge status: Wrong Answer
A = int(input())
B = int(input())
C = int(input())
X = int(input())

count = 0
a = 0
b = 0

for i in range(min(C, int(X/500)) + 1):
    a = X - 500 * i
    for j in range(min(B, int(a/100)) + 1):
        b = a - 100 * j
        if int(b/50) <= C:
            count += 1
print(count)
# Judge status: Wrong Answer
HP = int(input())
if HP == 1:
  print("1")

else:
  #print(bin(HP))
  print(pow(2,len(bin(HP))-3))
# Judge status: Accepted
from heapq import heapify, heappop, heappush
N = int(input())
Alist = list(map(int, input().split()))
heapify(Alist)
while len(Alist) > 1:
    atk = heappop(Alist)
    Alist = [A % atk for A in Alist if (A % atk != 0)]
    heapify(Alist)
    heappush(Alist, atk)
print(Alist[0])
# Judge status: Accepted
n = int(input())
s = list(input())

lft = [0]
rgt = [0]

cnt = 0
for i in range(1,n):
    if s[i-1] == "W":
        cnt += 1
    lft.append(cnt)

cnt = 0
for i in range(1,n):
    if s[(i)*(-1)] == "E":
        cnt += 1
    rgt.append(cnt)

ans = 10**9
for i in range(n):
    ans = min(ans,lft[i]+rgt[(i+1)*(-1)])
print(ans)
# Judge status: Accepted
s={c:list(input()) for c in "abc"}
i="a"
while s[i]:
  i = s[i].pop(0)
print(i.upper())
# Judge status: Accepted
import math
a,b,x=map(int,input().split())
if 2*x>=a*a*b:
  y=a*a*b-x
  bb=(2*y)/(a*a)
  ans=math.degrees(math.atan(bb/a))
  
else:
  bb=2*x/(a*b)
  ans=math.degrees(math.atan(b/bb))
  
print(ans)
# Judge status: Wrong Answer
# AGC 025 A - Digits Sum
N = int(input())

def sum_of(num): #各位の合計値を返す
    list_b = []
    k = 0
    while num > 0:
        list_b.append(num % 10)
        num = num // 10
    for i in range(len(list_b)):
        k += list_b[i]
    return k 

list_a =[]
for i in range(N//2+1):
    A = i
    B = N - i 
    list_a.append(sum_of(A) + sum_of(B))
    
print(str(min(list_a)))
# Judge status: Wrong Answer
import sys

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

ab = int(a + b)

for i in range(1, 101):
    if i**2 == ab:
        print("Yes")
        sys.exit()

print("No")
# Judge status: Accepted
k, R, a = int(input()), 7, -1
for i in range(1, k+1):
    if not R%k:
        a = i
        break
    R = (R * 10 + 7) % k
print(a)
# Judge status: Wrong Answer
X, A, B = map(int, input().split())

if B <= A:
  print("delicious")
elif B <= A + X:
  print("safe")
else:
  print("dengerous")
# Judge status: Wrong Answer
integer1, integer2, integer3 = map(int, input().split())
if integer1 <= integer3 <= integer2:
    print('YES')
else:
    print('NO')
# Judge status: Accepted
n,m=map(int,input().split())
k=0
for i in range(n):
    p,q=map(int,input().split())
    p1=abs(p**2)
    q1=abs(q**2)
    q2=q1+p1
    if q2<=m**2:
        k+=1
print(k)
# Judge status: Accepted
a=[int(i) for i in input().split()]
b=[]
for i in a:
    if i not in b:
        b.append(i)
print(len(b))
# Judge status: Accepted
N, K = map(int,input().split())
H = list(map(int, input().split()))

if(K >= N):
    print(0)
else:
    Hs = sorted(H)
    if(K != 0):
        print(sum(Hs[0:-K]))
    else:
        print(sum(Hs))
# Judge status: Accepted
a,b,x =map(int,input().split())
s = x-a
if 0<=s and s<=b:
  print("YES")
else:
  print("NO")
# Judge status: Accepted
s= input()
res = "2018"+s[4:len(s)]
print(res)
# Judge status: Wrong Answer
A,B,C,X=[int(input()) for i in range(4)]
cnt = 0
for a in range(1,A+1):
    Y = X - 500*a
    for b in range(1,B+1):
        Z = Y - 100*b
        for c in range(1,C+1):
            W = Z - 50*c
            if W == 0:
                cnt += 1
print(cnt)
# Judge status: Accepted
a, b, c = map(int, input().split())

ans = max(0, c - (a - b))
print(ans)
# Judge status: Accepted
A = []
A += map(int, input().split())
A += map(int, input().split())
A += map(int, input().split())
N = int(input())
for _ in range(N):
    b = int(input())
    try:
        A[A.index(b)] = 0
    except ValueError:
        pass
res = (
    (A[0]+A[1]+A[2])*(A[3]+A[4]+A[5])*(A[6]+A[7]+A[8])*
    (A[0]+A[3]+A[6])*(A[1]+A[4]+A[7])*(A[2]+A[5]+A[8])*
    (A[0]+A[4]+A[8])*(A[2]+A[4]+A[6])
)
print("Yes" if res == 0 else "No")
# Judge status: Wrong Answer
X=input()
if X== 3 or 5 or 7:
  print("YES")
else:
  print("NO")
# Judge status: Accepted
# a,b = map(int, input().split())
s = input()
c = s.count("R")

if c == 1:
    print(c)
elif c == 2:
    if s[0] == s[1]:
        print(c)
    elif s[1] == s[2]:
        print(c)
    else:
        print(1)
elif c == 3:
    print(3)
elif c == 0:
    print(0)
# Judge status: Wrong Answer
x = int(input())

n_11 = x // 11

x_tmp = x % 11

if x_tmp >= 6:
    ans = 2 * n_11 + 2
else:
    ans = 2 * n_11 + 1

print(ans)
# Judge status: Accepted
a, b, c = map(int, input().split())
print(max(0, c - (a-b)))
# Judge status: Wrong Answer
A,B = map(int, input().split())
if A >= 13:
    print(B)

elif A <= 5:
    print(0)

else:
    print(B/2)
# Judge status: Accepted
import math

n, d = map(int, input().split())
tree = n/(2 * d + 1)
print(math.ceil(tree))
# Judge status: Wrong Answer
n = int(input())

a_l = [int(x) for x in input().split()]

count = 1
minnum = a_l[0]
for i in range(n-1):
    if a_l[i] >= a_l[i+1]:
        minnum = a_l[i]
        count += 1
    else:
        pass
 
print(count)
# Judge status: Wrong Answer
c = input()
if c == 'a' or 'i' or 'u' or 'e' or 'o':
    print('vowel')
else:
    print('consonant')
# Judge status: Accepted
n=[int(x) for x in input()]

dp=[[100000000000 for i in range(len(n)+1)]for j in range(2)]
dp[0][0]=0
dp[1][0]=1
for i in range(len(n)):
  d=n[i]
  dp[0][i+1]=min(dp[0][i+1],min(d,11-d)+dp[0][i],10-d+dp[1][i])
  dp[1][i+1]=min(dp[1][i+1],d+1+dp[0][i],9-d+dp[1][i])
  
  
print(dp[0][len(n)])
#print(dp)
# Judge status: Wrong Answer
n=int(input())

l=[]
for i in range(n):
  a,b=map(str, input().split())
  b=str(100-int(b))
  a=a+b
  l.append(a)

l2=sorted(l)

for i in range(n):
  print(l.index(l2[i])+1)
# Judge status: Accepted
n = int(input())

ans = 2*(n // 11)
if n % 11 > 6:
    ans += 2
elif n % 11 > 0:
    ans += 1
else:
    ans += 0

print(ans)
# Judge status: Wrong Answer
a, b, c = map(int, input().split())
d = int(input())
l = [a, b, c]
index = l.index(max(l))
l[index] = l[index] * 2 * d
print(sum(l))
# Judge status: Wrong Answer
x,y=map(int,input().split())
if y%x == 0:
    print(-1)
else:
    print(x*2)
# Judge status: Accepted
a, b = input().split()
s = b + a
print(s)
# Judge status: Accepted
def main():
    A, B, C, D = map(int, input().split())
    while True:
        C -= B
        if C <= 0:
            print("Yes")
            exit()
        A -= D
        if A <= 0:
            print("No")
            exit()


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
import numpy as np
n,k=map(int,input().split())
a=list(map(int,input().split()))
s=np.prod(a[:k])
for i in range(0,n-k):
    if a[i]!=0:
        ns=s/a[i]*a[i+k]
    else:
        ns=np.prod(a[i+1:i+1+k])
    if ns>s:
        print("Yes")
    else:
        print("No")
    s=ns
# Judge status: Wrong Answer
import sys
import math
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__":
    n ,m = I2()
    print(max(1, n - 2)*max(1, m - 2))
# Judge status: Accepted
def get_c(p, k):
    c = 0
    while 1:
        if p * pow(2, c) >= k:
            return c
        c += 1


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

# check
prob = [1 / N] * N
for p, i in zip(range(1, N + 1), range(N)):
    c = get_c(p, K)
    prob[i] *= (1 / 2) ** c

print(sum(prob))
# Judge status: Accepted
nums = "1234567890"
a, b = map(int, input().split())
s = input()
ok_flg = True
for i in range(a):
    if s[i] not in nums:
        ok_flg = False
        break
if s[a] != "-":
    ok_flg = False
for j in range(b):
    if s[a + 1 + j] not in nums:
        ok_flg = False
        break
if ok_flg == True:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
from collections import Counter

n = int(input())
A = list(map(int, input().split()))
cnt_A = Counter(A)
# print(cnt_A)

kouho = []

ans = 0

for key in cnt_A:
    if cnt_A[key] >= 2:
        kouho.append(key)
    if cnt_A[key] >= 4:
        ans = max(ans, key ** 2)

if len(kouho) < 2:
    print(ans)
    exit()

kouho.sort()
ans = max(ans, kouho[-1] * kouho[-2])
print(ans)
# Judge status: Accepted
import io,sys
sys.setrecursionlimit(10**6)


def main():
    a,v = map(int,sys.stdin.readline().rstrip().split())
    b,w = map(int,sys.stdin.readline().rstrip().split())
    t = int(input())

    l = abs(a-b)
    p = v-w

    if p > 0 and l/p <= t:
        print("YES")
    else:
        print("NO") 
main()
# Judge status: Wrong Answer
def main():
  N = int(input())
  sanka_l = list(map(int, input().split()))
  count = 0
  min_num = min(sanka_l)
  for i in range(N):
    if sanka_l[i] >= N-i-min_num:
      break
    for j in range(i, N):
      if sanka_l[i] + sanka_l[j] == j - i:
        count += 1
  print(count)
      
main()
# Judge status: Accepted
n = int(input())

import math

ans = float('inf')
def calc(x,cnt):
    if x<6:
        global ans
        ans = min(ans,x+cnt)
    else:
        c = 6**int(math.log(x,6))
        if c*6==x:c*=6
        calc(x-c,cnt+1)
        c = 9**int(math.log(x,9))
        if c*9==x:c*=9
        calc(x-c,cnt+1)

calc(n,0)

print(ans)
# Judge status: Wrong Answer
N = str(input())
chr(ord(N)+1)
# Judge status: Accepted
n = int(input())

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

lset = set(lst)

if len(lset) == len(lst):
    print("YES")
else:
    print("NO")
# Judge status: Accepted
N = int(input())
ans = 0
for i in range(1,100000):
    if i**2 > N:
        print(ans)
        exit()
    ans = i**2
print(ans)
# Judge status: Accepted
X, Y, Z = map(int, input().split())

print((X-Z) // (Y+Z))
# Judge status: Accepted
N = int(input())
List = [int(x) for x in input().split()]
Sum = sum(List)
List.sort(reverse=True)
del List[::2]
Sum_B = sum(List)
Sum_A = Sum-Sum_B
print(Sum_A-Sum_B)
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))

cnt = 0
while True:
    if sum(list(1 for x in a if x % 2 == 1)) != 0:
        print(cnt)
        exit()  
    a = list(x // 2 for x in a)
    cnt += 1
print(cnt)
# Judge status: Accepted
#!/usr/bin/env python3

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

if a+b >= x and x >= a:
    print("YES")
else:
    print("NO")
# Judge status: Wrong Answer
n, k = map(int, input().split())
h = [int(i) for i in range(n)]
h.sort()

for i in range(n-k+1):
    a = h[i+k-1]-h[i]
    ans = a if i == 0 else min(ans, a)

print(ans)
# Judge status: Accepted
A, B = map(int, input().split( ))
print(A*B)
# Judge status: Wrong Answer
def ceil(a, b):
    return (a + b - 1) // b


N = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
n = sum(b) - sum(a)
for _a, _b in zip(a, b):
    if _a > _b:
        n -= _a - _b
    if _a < _b:
        n -= ceil(_b - _a, 2)
if n >= 0:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
l = {}
s, t = map(str, input().split())
a, b = map(int, input().split())
l[s] = a
l[t] = b
u = input()
l[u] -= 1
a = list(map(str, l.values()))
print("{} {}".format(a[0], a[1]))
# Judge status: Accepted
D, T, S = map(int, input().split())
print('Yes') if T * S >= D else print("No")
# Judge status: Wrong Answer
n = int(input())
lis = list(map(int, input().split()))

t = lis[0]
for i in range(1, n):
    t ^= i

ans = [0] * n
for i , j in enumerate(lis):
    ans[i] = t ^ j

print(*ans)
# Judge status: Accepted
s = int(input())
v = 1000000000
x=(v-s%v)%v
y=(s+x)//v
print("0 0 1000000000 1",int(x),int(y))
# Judge status: Accepted
import math
n = int(input())
print (2*math.pi*n)
# Judge status: Accepted
from itertools import count

def main():
    X = int(input())
    for i in count():
        for A in (-i, i):
            for B in range(-i, i+1):
                if A**5 - B**5 == X:
                    print(A, B)
                    return


main()
# Judge status: Wrong Answer
a,b=map(int,input().split())
if a<=b:
  print(b+b-1)
else:
  print(a+a-1)
# Judge status: Accepted
x,y = [int(x) for x in input().split()]
 
if y == 0:
    print(abs(x) + (x>0))
elif x < y < 0:
    print(y-x)
elif 0 < y < x:
    print(x-y+2)
else:
    print(abs(abs(y) - abs(x)) + (x < 0) + (y < 0))
# Judge status: Wrong Answer
k = int(input())
print(k//2 ** 2) if k % 2 == 0 else print(k//2 * (k//2 + 1))
# Judge status: Accepted
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

n = int(input())
ans = 0
for i in range(1, n+1,2):
    if len(make_divisors(i)) == 8:
        ans += 1

print(ans)
# Judge status: Accepted
ll=list(map(int,input().split()))
ll.sort()
if ll[2] == ll[0]+ll[1]:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
n = int(input())
a = sorted(list(map(int, input().split())))
x = 0
for i in a:
    x ^= i
for i in range(n):
    a[i] ^= x
print(*a)
# Judge status: Accepted
N = int(input())
a = list(map(int,input().split()))

x = a[0]
y = sum(a[1:N])
ans = abs(x-y)
for i in range(1,N-1):
    x += a[i]
    y -= a[i]
    ans = min(ans,abs(x-y))

print(ans)
# Judge status: Accepted
n = int(input())
a_list = list()
for _ in range(n):
    a_list.append(int(input()))
light_button = 1
target_light_button = 2
for i in range(n):
    light_button_index = light_button - 1
    light_button = a_list[light_button_index]
    if light_button == target_light_button:
        print(i + 1)
        exit(0)
print(-1)
# Judge status: Accepted
N,M = map(int,input().split())
C = {i:[1,0] for i in range(1,N+1)}
C[1][1] = 1
for _ in range(M):
    x,y = map(int,input().split())
    C[x][0] -= 1
    C[y][0] += 1
    if C[x][1]==1:
        C[y][1]=1
        if C[x][0]==0:
            C[x][1]=0
cnt = 0
for i in range(1,N+1):
    cnt += C[i][1]
print(cnt)
# Judge status: Wrong Answer
s=input()
s1=s.replace("eraser","0").replace("erase","0").replace("dreamer","0").replace("dream","0")
n=len(s1)
flag=False
for  i in range(0,n):
    if s1[i]!='0':
        flag=True
        break
        
if flag==False:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
from collections import Counter
N = int(input())
a = [min(8, int(x) // 400) for x in input().split()]
cnt = Counter(a)

min_col = 0     # レート3200未満の人の色の数
for i in range(8):
    if cnt[i]:
        min_col += 1

if min_col == 0:  # 全員3200以上
    min_col = 1
    max_col = N
else:
    max_col = min_col + cnt[8]

print(min_col, max_col)