peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
#abc065 b
n=int(input())
a=[]
for i in range(n):
    x=int(input())
    a.append(x)

ans=-1
cnt=0
switch=1
while cnt<n:
    cnt+=1
    switch=a[switch-1]
    if switch==2:
        ans=cnt
print(ans)
# Judge status: Wrong Answer
s= int(input())
L0 = 2
L1 = 1
L = 0
for i in range(2,s+1):
  L = L0 + L1
  L0 = L1
  L1 = L
print(L)
# Judge status: Accepted
a=int(input())
b=int(input())

ans = set()
ans.add(a)
ans.add(b)
all = {1,2,3}
print((all-ans).pop())
# Judge status: Accepted
n = int(input())
A = list(map(int, input().split()))
C = [0]*9
for a in A:
    if a <3200:
        C[a//400] = 1
    else:
        C[8] += 1
s = sum(C[:8])
print(max(s, 1), s+C[8])
# Judge status: Accepted
w = input()
while "?" in w:
	p = w.rfind("?")
	try:
		if w[p+1] == "D":
			w = w.replace("?", "P", 1)
		else:
			w = w.replace("?", "D", 1)
	except IndexError:
		w = w.replace("?", "D", 1)
print(w)
# Judge status: Accepted
# ABC042C
N,K=map(int,input().split())
out=N
N=str(N)
a = list(map(int, input().split()))
while 1<2:
    N1=N
    i=0
    for i in range(len(a)):
        if str(a[i]) in N:
            N=int(N) 
            N+=1
            N=str(N)
    if N1==N:
        break

print(N)
# Judge status: Accepted
N = int(input())
i = 0

while N > i * 1000:
    i += 1

ans = i * 1000 - N
print(ans)
# Judge status: Wrong Answer
n=int(input())
v=sorted(list(map(int,input().split())))
ans=v[0]
for i in range(1,n):
    ans=(ans+v[i])//2
print(ans)
# Judge status: Accepted
def main():
    n = int(input())
    a = list(map(int, input().split()))
      
    l = set()    
    free = 0
    for aa in a:
        if aa // 400 >= 8:
            free += 1
        else:
            l.add(aa // 400)
    print(max(1,len(l)), len(l) + free)
        
    
if __name__ == '__main__':
    main()
# Judge status: Accepted
A,B,N = map(int,input().split())

def floor(x):
  return x//1

if N >= B-1:
  x = B-1
elif N < B-1:
  x = N

print(int(floor(A*x/B)-A*floor(x/B)))
# Judge status: Accepted
s = input()
words = ['eraser',  'erase', 'dreamer', 'dream']
for w in words:
    s = s.replace(w, '')
print('NO' if s else 'YES')
# Judge status: Accepted
(h,n),*c=[[*map(int,i.split())]for i in open(0)]
dp=[0]*20002
for i in range(h):dp[i]=min(dp[i-a]+b for a,b in c)
print(dp[h-1])
# Judge status: Wrong Answer
n = int(input())
a = list(map(int,input().split()))
b = sorted([x-i-1 for x,i in zip(a,range(n))])
print(sum([x-b[n//2] for x in b]))
# Judge status: Wrong Answer
X = int(input())

if X > 90:
    X = 180 - X

total = 1
while ((X * total) % 360 != 0):
    total += 1

print(total)
# Judge status: Accepted
X = int(input())
now = 0
time = 0
for i in range(1,10**5):
    now += i
    time += 1
    if now >= X:
        break
print(time)
# Judge status: Accepted
def gcd2(a,b):
    x, y = max(a, b), min(a, b)
    if x % y == 0:
        return y
    else:
        while x % y != 0:
            x, y = y, x % y
        return y


K = int(input())
s = [gcd2(a, b) for a in range(1, K+1) for b in range(a+1, K+1)]
t = [2 * gcd2(a, b) for a in range(1, K+1) for b in s]
n = [gcd2(a, b) for a in range(1, K+1) for b in range(1, K+1)]
print(sum(t)+sum(n))
# Judge status: Wrong Answer
def solution():
  N = int(input())
  xy = [map(int, input().split()) for _ in range(N)]
  x, y = [list(i) for i in zip(*xy)]

  cnt = 0
  for i in range(N):
    if cnt >= 3:
      return 'Yes'
    if x[i] == y[i]:
      cnt += 1
    else:
      cnt = 0
  return 'No'

print (solution())
# Judge status: Wrong Answer
s=input()
t=str("coffee")
x=1
for i in range(3,6):
    if s[i]!=t[i]:
        x=0
        print("No")
        break
        
if x==1:
    print("Yes")
# Judge status: Wrong Answer
n,m = map(int,input().split())
h = set(map(int,input().split()))
H = h
count = 0
for i in range(m):
    a,b = map(int,input().split())
    if a < b:
        h.discard(a)
    elif a > b:
        h.discard(b)

print(len(h))
# Judge status: Wrong Answer
a,b,c,x,y = map(int,input().split())
p = 0

if x > y:
    p += (x - y) * a
    x = y
if x < y:
    p += (y - x) * b
    y = x
if x > 0:
    n = x * 2 * c
    m = x * a + y * b
    p += min(n,m)

print(p)
# Judge status: Accepted
a, b = map(int, input().split())
print(1 + -(-(b - a) // (a - 1)))
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))
a2 = [a[0]]
for i in range(n-1):
  a2.append(a2[i]+a[i+1])

ans = []

if n == 2:
  print(abs(a[0]-a[1]))
  exit()

for i in range(n-1):
  tmp = abs(a2[-1] - 2*a2[i])
  ans.append(tmp)
print(min(ans))
# Judge status: Wrong Answer
n = int(input().strip())
count = 0
for i in range(n):
  a,b = map(int,input().strip().split())
  if a == b and count == 3:
    print('Yes')
  elif a == b:
    count += 1
  else:
    count = 0
print('No')
# Judge status: Wrong Answer
def main():
    n = int(input())
    ps = list(map(int, input().split()))
    ps_sort = sorted(ps)

    Count = 0
    for i, j in zip(ps, ps_sort):
        if i != j:
            Count += 1

    if Count == 2 or Count == 0:
        print('YES')
    else:
        print('No')


if __name__ == "__main__":
    main()
# Judge status: Accepted
x = int(input())
ans = 0

if x % 11 == 0:
    ans = (x // 11) * 2
elif x % 11 <= 6:
    ans = ((x // 11) * 2) + 1
else:
    ans = ((x // 11) * 2) + 2
print(ans)
# Judge status: Accepted
import math
def I(): return(list(map(int,input().split())))
n,m=I()
a=I()
t=math.ceil((1/(4*m))*sum(a))
c=0
for i in a:
	if i>=t:c+=1
print(["No","Yes"][c>=m])
# Judge status: Accepted
a,b,c,d = list(map(int,input().strip().split()))

if a <= c and d <= b:
  print(d-c)
elif a <= c and b >= c:
  print(b-c)
elif a >=c and b <=d:
  print(b-a)
elif a >=c and d >= a:
  print(d-a)

else:
  print(0)
# Judge status: Accepted
c = input()
list01 = ['a', 'e', 'i', 'o', 'u']
if c in list01:
    print('vowel')
else:
    print('consonant')
# Judge status: Accepted
#! /usr/bin/env python
# -*- coding: utf-8 -*-

def main():
	num = int(input())
	sum = 0
	for i in range(num):
		if not (i+1) % 3 == 0 and not (i+1) % 5 == 0:
			sum += (i+1)
	
	print (sum)

if __name__ == '__main__':
	main()
# Judge status: Wrong Answer
C123=list(input())
C456=list(reversed(input()))

if C123 == C456:
    print('YES')
else:
    print('No')
# Judge status: Accepted
N = input()

ans = 1000
for i in range(0,len(N)-2):
    ans = min(ans,abs(753-int(N[i:i+3])))

print(ans)
# Judge status: Accepted
k = int(input())
print((k//2) * -(-k//2))
# Judge status: Accepted
import collections
n = int(input())
A = [int(i) for i in input().split()]
ans = collections.Counter(A)
ans = list(ans)
if len(ans)==n:
  print('YES')
else:
  print('NO')
# Judge status: Accepted
N, M = map(int, input().split())

S_C = []
for _ in range(M):
    s, c = map(int, input().split())
    S_C.append([s, c])

if N == 1:
    r = range(0, 10)
elif N == 2:
    r = range(10, 100)
else:
    r = range(100, 1000)

for i in r:
    str_i = str(i)

    flag = True
    for s, c in S_C:
        if str_i[s - 1] != str(c):
            flag = False
            break

    if flag:
        print(i)
        quit(0)

print(-1)
# Judge status: Accepted
N, M = map(int, input().split())
A = [input() for _ in range(N)]
B = [input() for _ in range(M)]
b = any(all(A[i+k][j+l]==B[k][l] for k in range(M) for l in range(M)) for i in range(N-M+1) for j in range(N-M+1))
print("YNeos"[not b::2])
# Judge status: Accepted
# -*- coding: utf-8 -*-
# 標準入力を取得
D, N = list(map(int, input().split()))

# 求解処理
ans = (N + (N // 100)) * 100**D

# 結果出力
print(ans)
# Judge status: Wrong Answer
S = str(input())
front = int(S[:2])
back = int(S[2:])
S_list = list(S)

if front > 12 or front == 0:
    if 1 < back <= 12 :
        print("YYMM")
    else:
        print("NA")
elif front <= 12 and front == 0:
    if back <= 12 or back > 1: 
        print("AMBIGUOUS")
    else:
        print("MMYY")
# Judge status: Accepted
#!/usr/bin/env python3
import collections
import itertools as it
import math
#import numpy as np
 
#  = input()
x  = int(input())
#  = map(int, input().split())
#  = list(map(int, input().split()))
#  = [int(input()) for i in range(N)]
#
# c = collections.Counter()

n = x // 100
mod = x % 100
print(0 if 5 * n < mod else 1)
# Judge status: Wrong Answer
import sys;


class Main:
    s = set([i.strip() for i in sys.stdin.readlines()]);

    print(len(s));
# Judge status: Accepted
n,m = map(int, input().split())
a = sorted(list(map(int,input().split())))
d = [list(map(int, input().split())) for _ in range(m)]
d.sort(key=lambda x:(-x[1]))
e = []
for b,c in d:
    e += [c]*b
    if len(e) >= n:
        break
e = sorted(e)[::-1]
ans = 0
j = 0
for i in range(n):
    if j < len(e):
        if a[i] >= e[j]:
            ans += a[i]
        else:
            ans += e[j]
            j += 1
    else:
        ans += a[i]
print(ans)
# Judge status: Accepted
card = []
for i in range(3):
  card += list(map(int, input().split()))
N = int(input())
bingo = [(1, 2, 3), (4, 5, 6), (7, 8, 9), (1, 4, 7), (2, 5, 8), (3, 6, 9), (1, 5, 9), (3, 5, 7)]
for i in range(N):
  n = int(input())
  if n in card:
    card[card.index(n)] = "hit"
#print(card)
ans = "No"
for patt in bingo:
  if card[patt[0]-1] == card[patt[1]-1] == card[patt[2]-1] == "hit":
    ans = "Yes"
    break
print(ans)
# Judge status: Accepted
a, b, c = map(int, input().split())
if a == b == c:
    ans = 0
else:
    ans = 1 << 31
    for x in [a - b, b - c, c - a]:
        if x != 0:
            tmp = 0
            while x % 2 == 0:
                tmp += 1
                x >>= 1
            ans = min(tmp, ans)

if a == b == c and b % 2 == 0:
    print(-1)
else:
    print(ans)
# Judge status: Accepted
import math
n = int(input())
a = math.factorial(n)
print(a%(10**9+7))
# Judge status: Wrong Answer
a,b,c,d=map(int,input().split())
e=max(a,b)
f=min(c,d)
if e<f:
  print(f-e)
else:
  print(0)
# Judge status: Wrong Answer
k = int(input())
a,b = map(int,input().split())
if k < b-a+1:
  print("NG")
else:
  print("OK")
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))
c1_list = [0]*60
for i in range(n):
  b = format(a[i], '060b')

  for j in range(len(b)):
    if b[j] == "1":
      c1_list[j] += 1
count = 0
for i in range(60):
  count = (count + c1_list[i]*(n-c1_list[i])*2**(59-i)) % 1000000007
print(count)
# Judge status: Accepted
def main():
    A, B, C = sorted(map(int, input().split()))
    print((2 * C - A - B) // 2 + 2 if (2 * C - A - B) % 2 else
          (2 * C - A - B) // 2)
    return


main()
# Judge status: Wrong Answer
S = str(input())
year = int(S[0] + S[1])
month = int(S[2] + S[3])
if year <= 12 and year >= 1 and month >= 1 and month <= 12:
    print('AMBIGUOUS')
elif year >= 1 and year <= 99 and month >= 1 and month <= 12:
    print('YYMM')
elif year >= 12 and year <= 12 and month >= 1 and month <= 99:
    print('MMYY')
else:
    print('NA')
# Judge status: Wrong Answer
x = int(input('X'))
if x >= 30:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
a, b = map(int, input().split())

ans = 0 - -(a + b)//2

print(ans)
# Judge status: Wrong Answer
a,b,c = map(int, input().split())
k = int(input())
t = 0
if(a>=b):
  while(a>=b):
    b = 2*b
    t +=1
if(b>=c):
  while(b>=c):
    c = 2*c
    t +=1
if(t<=k):
  print("Yes")
else:
  print("NO")
# Judge status: Accepted
#!/usr/bin/env python3
from collections import deque
n = int(input())
a = list(map(int, input().split()))
b = deque([a[0]])

for i in range(1, n):
    if i % 2 == 1:
        b.append(a[i])
    else:
        b.appendleft(a[i])

if (n - 1) % 2 == 1:
    [print(ans, end = " ") for ans in list(b)[::-1]]
else:
    [print(ans, end = " ") for ans in list(b)]
# Judge status: Accepted
a, b, k = map(int, input().strip().split())
result = set()

for small in range(a, min(a + k, b + 1)):
    result.add(small)

for large in range(max(a, b - k + 1), b + 1):
    result.add(large)

result = sorted(list(result))

for r in result:
    print(r)
# Judge status: Wrong Answer
n = int(input())
l = [int(x) for x in input().split()]

diff = 0
subs = []
tmp = [l[0]]
for i in range(len(l)-1):
  # print(diff)
  a,b = l[i], l[i+1]
  d = a-b
  if diff == 0 or d == 0 or (diff < 0 and d < 0) or (diff > 0 and d > 0):
    tmp.append(b)
    diff = d
    continue
  diff = 0
  subs.append(tmp)
  tmp = [b]
subs.append(tmp)

print(len(subs))
# Judge status: Wrong Answer
def main():
    N = int(input())
    A = [int(input()) for _ in range(N)]
    max_A = max(A)
    max_A_2 = 1
    if len(set(A)) == 1:
        max_A_2 = max_A
    else:
        for a in A:
            if max_A_2 < a and a != max_A:
                max_A_2 = a

    for a in A:
        if a != max_A:
            print(max_A)
        else:
            print(max_A_2)


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
L, R, d = map(int, input().split())
if L==1:
  print(R)
else:
  ans = R//d - L//d
  print(ans)
# Judge status: Accepted
n = int(input())
s = list(input())
ans = ""

l = 0
for i in range(n):
    ans += s[i]
    if s[i] == ")":
        if l == 0:
            ans = "(" + ans
        else:
            l -= 1
    else:
        l += 1

ans += (")"*l)

print(ans)
# Judge status: Accepted
def solve():
    N, L = [int(i) for i in input().split()]
    S = []
    for _ in range(N):
        S.append(input())
    print(''.join(sorted(S)))

if __name__ == "__main__":
    solve()
# Judge status: Accepted
N=int(input())
d=[[int(s) for s in input().split()] for i in range(3)]
ans=0
for i in range(N):
    ans+=d[1][d[0][i]-1]
    if i<=N-2 and d[0][i+1]-d[0][i]==1:
        ans+=d[2][d[0][i]-1]
print(ans)
# Judge status: Accepted
S = list(input())
for x in range(len(S) - 2):
  if len(S) % 2 != 0 or x == 0:
    S.pop(-1)
    continue
  i = len(S) // 2
  if S[:i] * 2 == S:
    break
  else: S.pop(-1)
print(len(S))
# Judge status: Accepted
N = int(input())

l = 0
r = N
s = (r * (r + 1)) // 2
while r - l > 1:
    m = (r + l) // 2
    x = (m * (m + 1)) // 2
    if x >= N:
        r = m
        s = x
    else:
        l = m

for i in range(1,r+1):
    if i != s - N:
        print(i)
# Judge status: Wrong Answer
n = int(input())

for i in range(n):
	if int(i * 1.08) == n:
		print(int(i))
		exit()

print(":(")
# Judge status: Wrong Answer
s1 = input()
s2 = input()
if s1[0] == s2[2] and s1[1] == s2[1] and s1[2] == s2[0]:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
k,s=map(int,input().split())
ans=0
for i in range(0,k+1):
    for j in range(0,k+1):
        if 0 <= s-i-j <= k:
            ans += 1
print(ans)
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = list(map(int,input().split()))

ans = sum(b)

for i in range(n-1):
    if a[i]+1 == a[i+1]:
        ans += c[a[i]-1]

print(ans)
# Judge status: Wrong Answer
N = int(input())
H = [int(i) for i in input().split()]
for i in range(N-1):
    if(H[i] > H[i+1]):
        if(H[i] == H[i+1] + 1):
            H[i] -= 1
        else:
            print("No")
            exit()
for i in range(N-1):
    if(H[i] > H[i+1]):
        print("No")
        exit()
print("Yes")
# Judge status: Wrong Answer
lst = map(int, input().split())
print(' '.join(map(str, sorted(lst))))
# Judge status: Accepted
N = input()
A = [0]*N
B = [0]*N
for i in range(N):
  A[i], B[i] = map(int, raw_input().split())

AB = zip(B, A)
AB.sort()
x = 10**9
for b, a in AB[::-1]:
  x = min(x, b)-a
print "Yes" if x>=0 else "No"
# Judge status: Accepted
n, k = map(int, input().split())
hps = list(map(int, input().split()))

hps = sorted(hps,reverse=True)
hps = hps[k:]
hpsum = int(sum(hps))

print(hpsum)
# Judge status: Accepted
n,k=map(int,input().split())
a=[int(i) for i in input().split()]
res=100000000000000000000
for i in range(n-k+1):
    l=a[i]
    r=a[i+k-1]
    if l<=0<=r:
        res=min(res,(-l+r)*2-max(-l,r))
    elif r<0:
        res=min(res,-l)
    else:
        res=min(res,r)
print(res)
# Judge status: Accepted
#8 C - Colorful Leaderboard
N = int(input())
a = list(map(int,input().split()))

seen = [False]*8
cnt = 0
cnt_3200 = 0
for i in a:
    i = i//400
    if i >= 8:
        cnt_3200 += 1
    elif (seen[i] == False):
        cnt += 1
        seen[i] = True
    
if cnt == 0:
    print(1,cnt_3200)
else:
    print(cnt,cnt+cnt_3200)
# Judge status: Wrong Answer
N = int(input())
rest_dict = {}
city_list = []
for i in range(N):
    city, score = input().split()
    if city not in city_list:
        city_list.append(city)
        rest_dict[city] = [[score, i]]
    else:
        rest_dict[city].append([score, i])

coty_list = sorted(city_list)
for city in city_list:
    rest_list = rest_dict[city]
    rest_list = sorted(rest_list)
    for rest in rest_list:
        print(rest[1])
# Judge status: Wrong Answer
x=int(input())

q,r = divmod(x,11)
if r <= 6:a = 1
else:a = 2
  
print(2*q+a)
# Judge status: Accepted
N=int(input())
T,A=map(int,input().split())
H=list(map(int,input().split()))

l=[]
for i in range(N):
	l.append(abs(T-H[i]*0.006-A))
    
print(l.index(min(l))+1)
# Judge status: Wrong Answer
N, A, B = map(int,input().split())

count = 0

for i in range(N+1):
    i100 = i // 100
    i10 = (i - i100*100) // 10
    i1 = (i - i100*100 - i10*10) // 1

    isum = i100 + i10 + i1

    if A <= isum <= B:
        count += i

print(count)
# Judge status: Wrong Answer
N, K = map(int, input().split())

a = N // K
res = N - a * K
print(res)
# Judge status: Accepted
k = int(input())
a,b = map(int,input().split())

ans = b // k * k
#print(ans)
if ans >= a:
    print("OK")
else:
    print("NG")
# Judge status: Wrong Answer
import math
N=int(input())
x=[0]*N
y=[0]*N
for i in range(N):
    x[i],y[i]=map(int,input().split())
ans_sum=0
for i in range(N):
    for j in range(N):
        if i!=j:
            ans_sum+=math.sqrt((x[j]-x[i])**2+(y[j]-y[i])**2)**0.5
print(ans_sum/N)
# Judge status: Wrong Answer
n = int(input())
l = list(map(int,input().split()))

from itertools import accumulate
cum=list(accumulate(l))

tot=sum(l)
ans=10**9+7
for i in cum:
    ans=min(ans, abs(tot-i*2))
print(ans)
# Judge status: Wrong Answer
n=int(input())
a=list(map(int,input().split()))[0]
print("1\n1" if a==1 else "0")
# Judge status: Accepted
x,y=map(int,input().split())
print(len(bin(y//x))-2)
# Judge status: Accepted
from collections import Counter
S = input()
counter = Counter(S)
ca, cb, cc = counter['a'], counter['b'], counter['c']
cabc = [ca, cb, cc]
if max(cabc) - min(cabc) <= 1:
    print('YES')
else:
    print('NO')
# Judge status: Accepted
from collections import Counter
N = int(input())
A = [int(input()) for _ in range(N)]
ans = 0
for count in Counter(A).items():
    if count[1] % 2 != 0:
        ans += 1
print(ans)
# Judge status: Accepted
def main():
    s = sorted(input())
    print("Yes" if s[0] == s[1] and s[2] == s[3] and s[0] != s[3] else "No")


if __name__ == "__main__":
    main()
# Judge status: Accepted
alpha_small_ = [chr(i) for i in range(97, 97+26)] #アルファベッドの小文字

n = int(input())
ans = []
def solve(now,i):
    if len(now) == n:
        ans.append(now)
        return
    for j in range(i+1):
        solve(now+alpha_small_[j],max(i,j+1))

solve("a",1)


for x in sorted(ans):
    print(x)
# Judge status: Accepted
n,m=map(int,input().split())
if n==1 and m==1:
    print(1)
elif n==1 or m==1:
    print(n*m-2)
else:
    print((m-2)*(n-2))
# Judge status: Wrong Answer
n = int(input())
a = 0
b = 0
ans = 1000000000
for i in range(1, n-1):
    a = n - i
    b = n - a
    a = list(map(int,str(a)))
    b = list(map(int,str(b)))
    if sum(a) + sum(b) <= ans:
        ans = sum(a) + sum(b)
print(ans)
# Judge status: Wrong Answer
N = int(input())
nums = [int(s) for s in input().split()]
 
min_breaks = -1
 
count_num = 1

for i in range(N):
  if nums[i] == count_num:
      if min_breaks == -1:
          min_breaks = 0
      min_breaks += ((i+1) - count_num)
      count_num+=1
  
print(min_breaks)
# Judge status: Accepted
n = int(input())
a = [int(i) for i in input().split()]
d = {1 : 0, 2 : 0, 4 : 0}
for i in a:
    if i % 4 == 0:
        d[4] += 1
    elif i % 2 == 0:
        d[2] += 1
    else:
        d[1] += 1
if d[1] <= d[4]:
    print("Yes")
elif d[1] - d[4] == 1 and d[2] == 0:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
N, M = map(int, input().split())
H = list(map(int, input().split()))
A, B = [], []

for i in range(M):
    a, b = map(int, input().split())
    if H[a-1] < H[b-1]:
        H[a-1] = H[b-1]
    else:
        H[b-1] = H[a-1]

print(len(set(H)))
# Judge status: Wrong Answer
n = int(input())
l=list(map(int ,input().split()))
four=0
two=0
one=0
for i in range(n):
	if l[i]%2==0:
		if l[i]==2:
			two+=1
		else:
			four+=1
	elif l[i]==1:
		one+=1

if one>=1:
	if n/2>=four>=one/2:
		print('Yes')
	else:
		print('No')
elif two==1:
	if n/2>=four:
		print('Yes')
	else:
		print('No')
elif four+two>=n/2:
	print('Yes')
else:
	print('No')
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))

cnt = A[0]
for i in A[1:]:
    cnt ^= i

lst = []
for i in A:
    lst.append(i^cnt)
print(*lst)
# Judge status: Accepted
S = input()
alphabet = [chr(ord("a") + i) for i in range(26)]
ans = "None"

for c in alphabet:
    if c not in S:
        ans = c
        break

print(ans)
# Judge status: Wrong Answer
S = input()

ans = "AC"

if S[0] == "A":
    pass
else:
    ans = "WA"

if S[2] == "C" and S[-2] == "C":
    ans = "WA"
elif S[2] == "C" or S[-2] == "C":
    pass
else:
    ans = "WA"

print(ans )
# Judge status: Accepted
n,x,y=map(int, input().split())
ans=[0]*(n-1)
for i in range(1,n):
    for j in range(i+1,n+1):
        d1=abs(x-i)+abs(y-j)+1
        d2=j-i
        ans[min(d1,d2)-1]+=1

for i in range(n-1):
    print(ans[i])
# Judge status: Accepted
n = int(input())
s = input()
if n%2:
    print('No')
else:
    n //= 2
    if s[:n]==s[n:]:
        print('Yes')
    else:
        print('No')
# Judge status: Accepted
import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))

N, A, B = inm()


def solve():
    if A > B:
        return 0
    if N == 1:
        return 0 if A != B else 1
    a = A * (N - 1) + B
    b = B * (N - 1) + A
    return b - a + 1


print(solve())
# Judge status: Accepted
a,b=map(int,input().split())
s=input()
n=[str(i)for i in range(10)]
for i in range(a + b + 1):
 if(i==a and s[i]!='-')or(i!=a and s[i]not in n):
  print('No');exit()
print('Yes')
# Judge status: Accepted
a,b=input().split()
a=int(a)
b=int(b)
if a%(b*2+1)==0:
  print(a//(b*2+1))
else:
  print(a//(b*2+1)+1)
# Judge status: Accepted
from fractions import gcd

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

fgcd, ftmp = [], a[0]
for i in a:
    ftmp = gcd(ftmp,i)
    fgcd.append(ftmp)

bgcd, btmp = [], a[-1]
for i in a[::-1]:
    btmp = gcd(btmp, i)
    bgcd.append(btmp)
bgcd=bgcd[::-1]

egcd = [bgcd[1]] + [0] * (n - 2) + [fgcd[n - 2]]
for i in range(1, n - 1):
    egcd[i] = gcd(fgcd[i - 1], bgcd[i + 1])
print(max(egcd))
# Judge status: Accepted
n,r = map(int,input().split())
if n < 10:
    h = 100*(10-n)
    print(r+h)
else:
    print(r)
# Judge status: Accepted
N=int(input())
import collections
l=list(map(int,input().split()))
cnt=collections.Counter(l)
if cnt[0] > 1 or l[0] != 0:
   print(0)
   exit()
ans=1
mod=998244353
for i in range(1,max(cnt)):
   ans*=pow(cnt[i],cnt[i+1],mod)
   ans%=mod
print(ans)
# Judge status: Wrong Answer
d=int(input())
print("Christmas"+"EVE"*(25-d))
# Judge status: Accepted
from collections import Counter
n = int(input())
a = list(map(int, input().split()))

a = Counter(a)
cnt = 0
for k, v in a.items():
    if k == v:
        continue
    elif k > v:
        cnt += v
    else:
        cnt += v - k

print(cnt)
# Judge status: Accepted
N,M = map(int, input().split())

K = []
A = []
for i in range(N):
    k, *a = map(int, input().split())
    K += [k]
    A += a

counter = 0
for j in range(1,M+1):
    if A.count(j) == N:
        counter += 1

print(counter)
# Judge status: Accepted
import math
N, K=map(int,input().split())
A=list(map(int,input().split()))

def judge(ans,K,A):
    cut=0
    for i in range(len(A)):
        cut+=(A[i]-1)//ans
    if cut>K:
        return False
    else:
        return True


ansp=max(A)
ansm=0
ans=(ansp+ansm)//2
d=1
while ansp-ansm>d:
    
    if judge(ans,K,A):
        ansp=ans
        
    else:
        ansm=ans
        
    ans=(ansp+ansm)//2
print(ansp)