peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
# -*- coding: utf-8 -*-
n = int(input())
h = [int(i) for i in input().split()] 

for i in range(n-1):
    if h[i] > h[i + 1]:
        h[i] -= 1
#print(h)
#print(sorted(h))
if h != sorted(h):
    print("No")
else:
    print("Yes")
# Judge status: Wrong Answer
S=input()
if (S[2]==S[3] and S[4]==S[5]):
    s=set(S)
    print("Yes") if len(s)==4 else print("No")
# Judge status: Accepted
from collections import Counter
N = int(input())
*A, = map(int, input().split())
A.sort()
c = Counter(A)
ans = 0
d = [0]*(10**6+1)
for i in range(N):
    if d[A[i]] == 0:
        if c[A[i]] == 1:
            ans += 1
        j = A[i]
        while j <= (10**6):
            d[j] += 1
            j += A[i]
print(ans)
# Judge status: Accepted
def main():
    h1, m1, h2, m2, k = map(int, input().split())
    time = (h2 - h1) * 60 - m1 + m2
    print(max(time - k, 0))


if __name__ == '__main__':
    main()
# Judge status: Accepted
N = int(input())
S = input()
r_c = 0
ch = 0
for i in S:
  if i == "R":
    r_c += 1
for i in range(r_c):
  if S[i] == "W":
    ch += 1
print(ch)
# Judge status: Accepted
N = int(input())
S = input()

R = [0]
W = [0]
r = 0
w = 0

for i in range(N):
    if S[i]=="W":
        w+=1
    else:
        r+=1
    R.append(r)
    W.append(w)
ans = N
for i in range(N+1):
    ans = min(ans,max(W[i],R[N]-R[i]))
print(ans)
# Judge status: Wrong Answer
import math

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

if x >= a**2*b/2:
    print(math.degrees(math.atan(2*(a**2*b-x)/a**3)))

else:
    print(math.degrees(math.atan(b**2/x)))
# Judge status: Accepted
# JavaScript で WA が出るので Python で書き直し
a, b, c = map(int, input().split())
if (a * b * c % 2) == 0:
  print(0)
else:
  print(min([a * b, a * c, b * c]))
# Judge status: Wrong Answer
import sys
from collections import deque


def input():
    return sys.stdin.readline().strip()


MOD = 10 ** 9 + 7
sys.setrecursionlimit(20000000)
INF = float("inf")


def main():
    N = int(input())
    q = deque(["a"])
    cnt = 1
    while cnt <= N:
        d = q.popleft()

        if len(d) == N:
            print(d)
        cnt = max(cnt, len(d))
        a = ord(d[-1])
        for i in range(ord("a"), a + 2):
            q.append(d + chr(i))


if __name__ == "__main__":
    main()
# Judge status: Accepted
A, B, N = map(int, input().split())
Ymax=0
if A*N < B:
  print(0)
elif N<B:
  Ymax = A*N // B
  print(Ymax)
else:
  x = B-1
  Ymax = A*x//B - A*(x//B)
  print(Ymax)
# Judge status: Accepted
import math
n, d = map(int, input().split())
x = []
for _ in range(n):
    x.append(list(map(int, input().split())))
ans = 0
for i in range(n-1):
    for j in range(i+1, n):
        dist = 0.0
        for k in range(d):
            dist += (x[i][k] - x[j][k])**2
            # print(x[i][k], x[j][k])
        if (math.sqrt(dist)).is_integer():
            # print(i, j, dist)
            ans += 1
# print(x)
print(ans)
# Judge status: Accepted
a,b,k = map(int,input().split())
ans = []
ans.append(a)
ans.append(b)
for i in range(min(k,b-a)):
    ans.append(a+i)
    ans.append(b-i)
ans = list(set(ans))
ans.sort()
for i in ans:
    print(i)
# print(ans)
# Judge status: Accepted
n,k=map(int,input().split())
H=list(map(int,input().split()))
H.sort()
if n>=k:
    print(sum(H[:n-k]))
else:
    print(0)
# Judge status: Accepted
import sys

def Forbidden_List(x,n,p):
  for i in range(n//2 + n%2 + 1):
    if x - i not in p: 
        return x - i
    if x + i not in p:
        return x + i

if __name__ == '__main__':
    input = sys.stdin.readline
    
    inp1 = input().rstrip().split()
    x,n = int(inp1[0]),int(inp1[1])
    if n == 0:
        print(x)
    else: 
        inp2 = input().rstrip().split()
        p = list(map(int,inp2))
        print(Forbidden_List(x,n,p))
# Judge status: Wrong Answer
n, k = map(int, input().split())
a = set((int(x) for x in input().split()))

if k >= len(a):
  print(0)
else:
  k = len(a) - k
  a = list(a)
  a.sort()
  result = 0
  for i, e in enumerate(a):
    if i == k:
      break
    result += e
  print(result)
# Judge status: Accepted
x = int(input())
ans = 0

ans += 1000 * (x//500)
x = x%500
ans += 5 * (x//5)
print(ans)
# Judge status: Accepted
print('Yes' if len(list(set(input())))==3 else 'No')
# Judge status: Wrong Answer
n=int(input())
for i in range(1,10):
    m=n/i
    if m.is_integer() and 1<=m<=9:
        ans="Yes"
        break
else:
    ans="No"
    print(ans)
# Judge status: Accepted
N, M = map(int, input().split())
A = set(int(input()) for _  in range(M))

MOD = 10**9 + 7

dp = [0]*(N+1)
dp[0] = 1

for i in range(1,N+1):
    if i in A:
        continue
    x = dp[i-1]
    if i > 1:
        x += dp[i-2]
    dp[i] = x%MOD
answer = dp[N]
print(answer)
# Judge status: Wrong Answer
S = input()
print(S.replace(S[3],"8"))
# Judge status: Accepted
w,h,n=map(int,input().split())
xya=[list(map(int,input().split())) for _ in range(n)]
xya_1=0
xya_2=w
xya_3=0
xya_4=h
for _ in range(n):
  if xya[_][2]==1:
    xya_1=max(xya_1,xya[_][0])
  elif xya[_][2]==2:
    xya_2=min(xya_2,xya[_][0])
  elif xya[_][2]==3:
    xya_3=max(xya_3,xya[_][1])
  else:
    xya_4=min(xya_4,xya[_][1])
print(max(0,xya_2-xya_1)*max(0,xya_4-xya_3))
# Judge status: Wrong Answer
a, b = map(int, input().split())
if max(a,b) <= 12:
    print(min(a,b))
elif a <= 12:
    print(a)
else:
    print(12)
# Judge status: Wrong Answer
a,b=map(int,input().split())
if a>=13:print(b)
elif a>=6:print(b//2)
print(0)
# Judge status: Wrong Answer
import sys
import bisect
import itertools
import collections
import fractions
import heapq
import math
from operator import mul
from functools import reduce
from functools import lru_cache


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    a, b, x = map(int, readline().split())

    tan = 2 * b / a - 2 * x / (a ** 3)
    ans = math.degrees(math.atan(tan))
    print(ans)

if __name__ == '__main__':
    solve()
# Judge status: Accepted
n = int(input())
b = [0, 0, 0]

for _ in range(n):
    a = [int(i) for i in input().split()]
    c = [0] * 3
    for i in range(3):
        for j in range(3):
            if i == j:
                continue
            c[i] = max(c[i], b[j] + a[i])
    b = c
print(max(b))
# Judge status: Wrong Answer
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

s = {'a':list(ns())[::-1],'b':list(ns())[::-1],'c':list(ns())[::-1]}
i = 'a'
while s[i]:
    s[i].pop()

print(i.upper())
# Judge status: Wrong Answer
n, r = map(int, input().split())
if n < 10:
  print(r)
else:
  print(r + 100*(10 - n))
# Judge status: Accepted
# from collections import deque
from collections import Counter
# from scipy.misc import comb
# from copy import deepcopy

n = int(input())
a = list(map(int, input().split()))
C = Counter(a)
S = 0
"""
for key in C:
    S += comb(C[key], 2, exact=True)
"""
for i in C.keys():
    S += C[i]*(C[i]-1)//2

for k in range(n):
    A = a[k]
    print(S - C[A] + 1)
# Judge status: Accepted
def main():
    N=int(input())
    A=[int(_) for _ in input().split()]
    D={}
    ans=0
    for i,a in enumerate(A):
        if i-a in D:
            ans += D[i-a]
        if i+a in D:
            D[i+a] += 1
        else:
            D[i+a] = 1
    print(ans)

main()
# Judge status: Wrong Answer
a, b = (int(x) for x in input().split())
c = a * b
if c > 0 and c < 82 :
    print(c)
else:
    print("-1")
# Judge status: Accepted
import math
ans=0
A=list()
M=list()
for i in range(5):
  a = int(input())
  if(a%10!=0):
    M.append(a%10)
  b=int(math.ceil(a/10)*10)
  A.append(b)
  ans+=b

if not M:
  print(ans)
else:
  ans+=min(M)-10
  print(ans)
# Judge status: Wrong Answer

n,k = map(int,input().split())
L = list(map(int,input().split()))
L2 = []

t = 1
r = 0
i = 0
c = 0
for j in range(n*2):
    #print(L2)
    t = L[t-1]
    if ｔ in L2:
        i = L2.index(t)
        r = len(L2) - i
        break
    else:
        L2.append(t)
#print(r)
#print(i)

k = (k - i)%r
#print(k)
print(L2[i+k-1])
# Judge status: Accepted
n = int(input())
an = [int(num) for num in input().split()]

sum = 0
for i in range(len(an)-1):
  if an[i] > an[i+1]:
    sum += an[i] - an[i+1]
    an[i+1] += an[i] - an[i+1]
    
print(sum)
# Judge status: Wrong Answer
def main():
    N, M =map(int, input().split())

    left = 1
    right = M*2
    for _ in range(M):
        print(left, right)
        left += 1
        right -= 1


if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(map(int, input().split()))

n = ii()
b = []
c = [0]
for i in range(n):
    l = li()
    b.append(1 if l[0] == l[1] else 0)
    if i != 0:
        c.append(c[i-1]+1 if b[i] == 1 else 0)

print("Yes" if max(c) > 2 else "No")
# Judge status: Wrong Answer
S = input()
s = list()
for a in S:
    s.append(a)

l1 = s[1::2]
l2 = s[0::2]

if 'L' in l1 and 'R' in l2:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり


N,K = MI()
A = LI()

from itertools import accumulate

for _ in range(min(K,100)):
    B = [0]*(N+1)
    for i in range(N):
        a = A[i]
        B[max(i-a,0)] += 1
        B[min(N,i+a+1)] -= 1
    C = list(accumulate(B))
    A = C

print(*[A[i] for i in range(N)])
# Judge status: Accepted
a,b = map(int,(input().split()))
if a <= 8 and b <= 8:
    print("Yay!")
else:
    print(":(")
# Judge status: Wrong Answer
a, b = map(int, input().split())
print("a" if b>=a else "a-1")
# Judge status: Accepted
def main():
    S = input()
    ans = "No"
    for i in range(2):
        if (S[i] != S[i+1]):
            ans = "Yes"
    print(ans)


if __name__ == '__main__':
    main()
# Judge status: Accepted
x = int(input())

if x == 3 or x == 5 or x == 7:
    print("YES")
else:
    print("NO")
# Judge status: Wrong Answer
N = int(input())

n = 100
a = 0

while N > n:
    a += n//100
    n *= 10

n //= 10

x = [[a]*9 for _ in range(9)]

b = N // n
for i in range(b-1):
    for j in range(9):
        x[i][j] += n//10

for i in range(N%n):
    c = i % 10
    if c != 0:
        x[b-1][c-1] += 1

for i in range(min(9, N)):
    x[i][i] += 1

cnt = 0

for i in range(9):
    for j in range(9):
        cnt += x[i][j] * x[j][i]

print(cnt)
# Judge status: Accepted
import math

def a():
    x = int(input())
    if x == 0:
        print(1)
    else:
        print(0)


def b():
    a,b,c,d = map(int,input().split())
    m=[a*c,a*d,b*c,b*d]
    print(max(m))



def c():
    pass



def d():
    pass


# a()
b()
# c()
# d()
# Judge status: Accepted
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

S = input()
if S[0] == S[1] == S[2] == "R":
    print(3)
elif S[0:2] == "RR" or S[1:3] == "RR":
    print(2)
elif "R" in S:
    print(1)
else:
    print(0)
# Judge status: Wrong Answer
n = int(input())
fizz_buzz_sum = 0

for i in range(n):
    if (i % 3 == 0 and i % 5 == 0) or i % 3 == 0 or i % 5 == 0:
        pass
    else:
        fizz_buzz_sum += i

print(fizz_buzz_sum)
# Judge status: Accepted
import math
n,d=map(int,input().split())
cnt=0
d=float(int(d))
for i in range(int(n)):
  x,y=map(int,input().split())
  x=float(int(x))
  y=float(int(y))
  res=float(math.sqrt(x*x+y*y))
  if(res<=d):
    cnt+=1
print(cnt)
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))
k1, k2, k4 = 0, 0, 0
for a_i in a:
    if a_i % 4 == 0:
        k4 += 1
    elif a_i % 2 == 0:
        k2 += 1
    else:
        k1 += 1
t = min(k1, k4)
k1 -= t
k4 -= t
result = k1 == 0 or (k1 == 1 and not k2)
print([ 'No', 'Yes' ][result])
# Judge status: Wrong Answer
n, m = list(map(int, input().split()))
lis = []
for i in range(n):
  lis.append(1)
  for i in range(m):
    lis.append(2)
    count = 0
    for i in range(len(lis)):
      for j in range(i + 1, len(lis)):
        if (lis[i] + lis[j]) % 2 == 0:
          count += 1
          print(count)
# Judge status: Accepted
s = input()
left, right = [0,], [0,]
a, b = 0, 0
for i in range(len(s)):
    a = a+1 if s[i] == '<' else 0
    left.append(a)
    b = b+1 if s[-1*(i+1)] == '>' else 0
    right.append(b)

right.reverse()
ans = sum(max(x, y) for x, y in zip(left, right))
print(ans)
# Judge status: Accepted
ar = list(map(int, input().split()))

for i in range(5):
	if ar[i] is 0:
		print(i + 1)
# Judge status: Accepted
a,b=map(int,input().split())
print([a+b,2*max(a,b)-1][max(a,b)-1>=min(a,b)])
# Judge status: Wrong Answer
import math

n,k =  map(int,input().split())
lis = []
for i in range(n):
    if i+1 >= k:
        lis.append(0)
    else:
        lis.append(math.ceil(math.log2((k/(i+1)))))

print(lis)


ans = []
for i in range(n):
    ans.append(1/n * (1/2)**lis[i])

print(sum(ans))
# Judge status: Accepted
N = int(input())

ans = "No"
for s in range(1, 10):
    if N % s != 0:
        continue
    else:
        if int(N/s) <= 9:
            ans = "Yes"
            break
            
print(ans)
# Judge status: Accepted
n= int(input())
cont=0
yes=0
for x in range(n):
    a,b= input().split()
    a, b= int(a), int(b)
    if a==b:
        cont+=1
    else:
        cont=0
    if cont>=3:
        yes=1
if yes==1:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
def LIS(A):
    dp = deque([A[0]])
    for a in A[1:]:
        if a <= dp[0]:
            dp.appendleft(a)
        else:
            dp[bisect_left(dp, a)-1] = a
    return len(dp)

##################################################################################################################

import sys
input = sys.stdin.readline
from collections import deque
from bisect import bisect_left

N = int(input())

A = [int(input()) for _ in range(N)]

print(LIS(A))
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))

li = {}
for i in range(n):
    if a[i] in li:
        li[a[i]] += 1
    else:
        li[a[i]] = 1

ans = 0
for i in li:
    if i==li[i]:
        continue
    elif i>li[i]:
        ans += li[i]
    elif i<li[i]:
        ans += li[i]-i
print(ans)
# Judge status: Accepted
X, Y = map(int, input().split())
if X % Y == 0:
    print(-1)
else:
    print(X)
# Judge status: Accepted
s = input()
q = int(input())
l = []
r = []
c = 0
for _ in range(q):
  t = input().split()
  if t[0] == '1':
    c += 1
    a = l
    l = r
    r = a
  else:
    if t[1] == '1':
      l.append(t[2])
    else:
      r.append(t[2])
l = "".join(l[::-1])
r = "".join(r)
if c%2 ==0:
  print(l + s + r)
else:
  print(l + s[::-1] + r)
# Judge status: Wrong Answer
import sys

s1 = str(input())
s2 = str(input())
ans = 0

for i in range(len(s1)):
    if s1[i] == s2[i]:
        ans += 1

print(ans)
# Judge status: Accepted
def solve(a, b, n):
    return a * min(b - 1, n) / b

assert solve(5, 7, 4) == 2
assert solve(1, 1, 1) == 0
assert solve(11, 10, 9) == 9

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

print solve(a, b, n)
# Judge status: Accepted
A, B = map(int,input().split())
S = list(input())
ans = "No"

if S.pop(A)=="-":
    for i in S:
        if i not in str([0,1,2,3,4,5,6,7,8,9]):
            break
    else:
        ans = "Yes"

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

A, B, C = sorted(ABC)

answer = 0
if (A - B) % 2:
  A += 1
  C += 1
  answer += 1  
answer += (B - A) // 2
answer += C - B

print(answer)
# Judge status: Accepted
def dividek(arr, n):
	arr.sort()
	return arr[n//2] - arr[(n//2)-1]
n = int(input())
arr = list(map(int, input().split()))
print(dividek(arr, n))
# Judge status: Accepted
if int(''.join(input().split())) % 4 == 0:print('YES')
else:print('NO')
# Judge status: Accepted
A = [int(input()) for i in range(3)]
ans = (A[0] + A[1]) * A[2] / 2
print(int(ans))
# Judge status: Accepted
n,m=map(int,input().split())
a=[]
b=[]
ok=False
for i in range(n):
    a+=[input()]
for i in range(m):
    b+=[input()]

for y in range(n-m+1):
    for x in range(n-m+1):
        aa=[a[i][x:x+m] for i in range(y,y+m)]
        if aa==b:
            ok=True
            break
    if ok:
        break
if ok:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
n = input()
if n[0] == "S":
    if n[1] == "S":
        if n[2] == "S":
            print("0")
        else:
            print("1")
    else:
        if n[2] == "S":
            print("1")
        else:
            print("2")
else:
    if n[1] == "S":
        print("1")
    else:
        if n[2] == "S":
            print("2")
        else:
            print("3")
# Judge status: Wrong Answer
N,X = map(int,input().split())
x = list(map(int,input().split()))
if N == 1:
    print(abs(x[0]-X))
    exit()
x.sort()
Mindif = x[1]-x[0]
import math
for i in range(1,N-1):
    Mindif = math.gcd(Mindif,x[i+1]-x[i])
print(Mindif)
# Judge status: Accepted
N, D = map(int, input().split())
D2 = D**2
ans = 0
for i in range(N):
    x, y = map(int, input().split())
    if x**2 + y**2 <= D2:
        ans += 1
print(ans)
# Judge status: Wrong Answer
# B - Postdocs

T = list(str(input()))
len_T = len(T)

for i in range(1, len_T):
    if T[i-1] == 'P' and T[i] == '?':
        T[i] = 'D'
    elif T[i-1] == '?' and T[i] == '?':
        T[i-1] = 'P'
        T[i] = 'D'
    elif T[i-1] == '?' and T[i] == 'D':
        T[i-1] = 'P'
    elif T[i-1] == '?' and T[i] == 'P':
        T[i-1] = 'P'
print(''.join(map(str, T)))
# Judge status: Wrong Answer
sa = list(reversed(input()))
sb = list(reversed(input()))
sc = list(reversed(input()))

turn = sa.pop()

while sa and sb and sc:
    if turn == 'a':
        turn = sa.pop()
    elif turn == 'b':
        turn = sb.pop()
    else:
        turn = sc.pop()

print(turn.upper())
# Judge status: Wrong Answer
given = [x for x in input()]
rets  = ''
for i, v in  enumerate(given):
    if v == "B" and len(rets) > 0:
        rets = rets[:-1]
    else:
        rets += v
print(rets)
# Judge status: Wrong Answer
num=input().split()
num=[int(i) for i in num]
line=input().split()
line=[int(i) for i in line]


for w in range(num[1]):
  light=[1 for j in range(num[0])]
  for x in range(num[0]):
    y=line[x]
    ran=list(range(x-y,x+y+1))
    if x-y<0:
      del ran[0:-x+y]
    if x+y+1>num[0]:
      del ran[-(x+y+1-num[0]):]
    for z in ran:
      if x==z:
        continue
      else:
        light[z]+=1
  line=light
  
print(light)
# Judge status: Accepted
#!/usr/bin/env python
# coding: utf-8

# In[6]:


A,B = map(int, input().split())


# In[8]:


ans = 0
for x in range(A,B+1):
    x = str(x)
    for i in range(len(x)//2):
        if x[i] != x[-(i+1)]:
            break
    else:
        ans += 1
print(ans)


# In[ ]:
# Judge status: Accepted
N, M = map(int, input().split())
g = {i: set() for i in range(1, N + 1)}
for _ in range(M):
    A, B = map(int, input().split())
    g[A].add(B)
    g[B].add(A)

if g[1].intersection(g[N]):
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')
# Judge status: Accepted
import math
A,B,N = list(map(int, input().split()))


if(N < B):
  print(math.floor(A * N / B) - A * math.floor(N / B))
else:
  print(math.floor(A * (B-1) / B) - A * math.floor((B-1) / B))
# Judge status: Accepted
from math import sqrt
from bisect import bisect_left


def sieve(x):
    """
    Sieve of Eratosthenes
    :param x: max value
    :return: list of primes
    """

    primes = []
    li = list(range(2, x + 1))

    while li[0] <= sqrt(x):
        p = li[0]
        primes.append(p)
        li = [e for e in li if e % p != 0]

    primes += li
    return primes


x = int(input())

primes = sieve(10 ** 6)

i = bisect_left(primes, x)
ans = primes[i]
print(ans)
# Judge status: Accepted
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()
# Judge status: Accepted
def main():
    a = int(input())

    ans = a + a*a + a*a*a
    print(ans)

main()
# Judge status: Accepted
n = int(input())
p = list(map(int, input().split()))
q = sorted(p)
count = 0
for i in range(n):
    if p[i] != q[i]:
        count += 1
if (count == 0) or (count == 2):
    print('YES')
else:
    print('NO')
# Judge status: Wrong Answer
A, B = map(int, input().split())
cnt = 0
for i in range(A, B+1):
    start = i // 1000
    end = i % 100
    if start == end:
        cnt += 1
print(cnt)
# Judge status: Accepted
L,R,d=map(int,input().split())

answer=0
for i in range(L,R+1):
  if i%d==0:
    answer+=1

print(answer)
# Judge status: Wrong Answer
a=int(input())
li = list(map(int, input().split()))
count=0
for i in range(a):
  if((i%2==1) and (li[i]%2==1)):
    count+=1
print(count)
# Judge status: Accepted
s = input()
for i, j in enumerate(s):
    if (i + 1) % 2 == 1 and j == 'L':
        print('No')
        exit()
    elif (i + 1) % 2 == 0 and j == 'R':
        print('No')
        exit()
print('Yes')
# Judge status: Accepted
N = int(input())
a = list(map(int, input().split()))

ans = 0
for i in range(N):
    if a[i] % 2 == 1 and i % 2 == 0:
        ans += 1

print(ans)
# Judge status: Accepted
n=int(input())
k=int(input())
x=int(input())
y=int(input())
print(
x*min(n,k)+y*max(0,n-k)
)
# Judge status: Wrong Answer
a, b, c= (input().split())
d = int(''.join(a))
if d % 4 == 0:
    print("YES")
else:
    print("NO")
# Judge status: Accepted


if __name__ == '__main__':
    O=input()
    E=input()
    O=list(O)
    E=list(E)
    password=[]
    n=min(O.__len__(),E.__len__())
    for i in range(n):
        password.append(O.pop(0))
        password.append(E.pop(0))
    password+=O
    password+=E
    print("".join(password))
# Judge status: Accepted
N,M=list(map(int,input().split()))
 
S=[]
s=0
for m in range(M):
    e = int(input())
    S.append(list(range(s,e)))
    s = e+1

e = int(N+1)
S.append(list(range(s,e)))
 
fibo=[0,1]
for n in range(2,N+2):
    fibo.append(fibo[n-2]+fibo[n-1])
    
ans=1
for s in S:
    ans=ans*fibo[len(s)]
print(ans%1000000007)
# Judge status: Accepted
import sys
sys.setrecursionlimit(4100000)
import math
INF = 10**9

def main():
    n, a, b = map(int, input().split())

    ans = 0
    for i in range(1, n+1):
        tmp = 0
        S = str(i)
        for s in S:
            tmp += int(s)
        if a <= tmp and tmp <= b:
            ans += i
    print(ans)


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
N = input()
ans = 0
for i in range(len(N)):
    ans += int(i)
print('Yes' if ans % 9 == 0 else 'No')
# Judge status: Wrong Answer
import copy
N=int(input())  #数値入力 「N」だけの入力のとき
X=[int(i) for i in input().split()]

N = N - 1 + N % 2

X.sort()

for i in X:
    a = copy.copy(X)
    a.remove(i)
    print(a[N//2])
# Judge status: Accepted
S = input()
st = ''
for si in S:
    if si == '0':
        st += '0'
    if si == '1':
        st += '1'
    if si == 'B':
        if st == '':
            pass
        else:
            st = st[0:-1]
print(st)
# Judge status: Wrong Answer
N=int(input())
p=list(map(int,input().split()))

ans=0
for i in range(N-1):
    if p[i]==i+1:
        p[i],p[i+1]=p[i+1],p[i]
        ans+=1
print(ans)
# Judge status: Accepted
N = int(input())
a = [0] + list(map(int, input().split()))
b = set([i for i in range(N//2 + 1, N + 1) if a[i] == 1])

for i in range(N//2, 0, -1):
    k, temp = 2, 0
    while k * i < N + 1:
        if k * i in b:
            temp += 1
        k += 1
    if temp % 2 != a[i]:
        b.add(i)

if len(b) > 0:
    print(len(b))
    print(' '.join(list(map(str, sorted(list(b))))))
else:
    print(0)
# Judge status: Wrong Answer
n=int(input())
if 400<=n and n<=599:
 print(8)
if 600<=n and n<=799:
 print(7)
if 800<=n and n<=999:
 print(6)
if 1000<=n and n<=1199:
 print(5)
if 1200<=n and n<=1399:
 print(4)
if 1400<=n and n<=1599:
 print(3)
if 1600<=n and n<=1899:
 print(2)
if 1800<=n and n<=1999:
 print(1)
# Judge status: Wrong Answer
from math import *
x=int(input())

x=x/100
a=101/100
ans=ceil(log(x,a))

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

table = [0] * (N + 1)
s = {6 ** i for i in range(7) if 6 ** i <= N} | {9 ** i for i in range(6) if 9 ** i <= N}
for i in range(1, N + 1):
    table[i] = min(table[i - j] for j in s if i - j >= 0) + 1
print(table[N])
# Judge status: Wrong Answer
for a in range(1,11):
  print(a+a**2+a**3)