peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
import math
a, b = input().split(" ")
c = a + b
c = int(c)
d = math.sqrt(c)

if d - int(d) >0:
    print("No")
else:
    print("Yes")
# 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)
x=-1
for i in a:
    if x+1==i:
        ans+=c[x-1]
    x = i
print(ans)
# Judge status: Accepted
# -*- coding: utf-8 -*-
from statistics import mean
from math import ceil

data = list(map(int, list(input().split())))
print(ceil(mean(data)))
# Judge status: Accepted
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)
else:
    print((n-2) * (m-2))
# Judge status: Wrong Answer
n=int(input())
h=list(map(int,input().split()))
for i in range(n):
    ans="Yes"
    if i>0 and h[i-1]-h[i]>1:
        ans="No"
print(ans)
# Judge status: Wrong Answer
def productSum(A,n) -> int:
    MOD = 1000000007
    sum_arr = 0
    for i in range(n):
        sum_arr += A[i]
        sum_arr %= MOD
    sum_arr_sq = (sum_arr*sum_arr)%MOD
    indiv_sq_sum = 0
    for i in range(n):
        indiv_sq_sum += (A[i]*A[i])
        indiv_sq_sum %= MOD
    ans = ((sum_arr_sq - indiv_sq_sum))//2
    ans %= MOD
    return ans

n = int(input())
arr = [int(x) for x in input().split()]
print(productSum(arr,n))
# Judge status: Wrong Answer
a, b = map(int, input().split())
print(max(0,a-1)+max(0,b-a+1))
# Judge status: Wrong Answer
from itertools import permutations

n = int(input())
p = tuple(map(int,input().split()))
q = tuple(map(int,input().split()))
if p == q:
    print(0)
    exit()
base = sorted(p)
pi = 0
qi = 0
for i, v in enumerate(permutations(base, n)):
    print(v)
    if p == v:
        pi = i + 1
    elif q == v:
        qi = i + 1
        
    if pi * qi != 0:
        break
print(abs(pi-qi))
# Judge status: Wrong Answer
import bisect

N = int(input())
L = list(map(int, input().split()))
s = 0

L = sorted(L)
print(L)
for c in reversed(range(2, N)):
	for b in reversed(range(1, c)):
		a = bisect.bisect_left(L, L[c]-L[b])
		if a<b:
			s += b-a
print(s)
# Judge status: Accepted
n=input()

if n[-1] == "s":
    print(n+"es")
else:
    print(n+"s")
# Judge status: Accepted
x=input()
X=list('{}'.format(x))
a=[]
for i in range(len(X)):
    a.append(int(X[i]))
A=sum(a)
print(A)
# Judge status: Wrong Answer
A, B = map(int, input().split())
print(A*B)
# Judge status: Accepted
# 初期入力
r = int(input())
#mennseki_r =3.14*r*r
#mennseki_1 =3.14*1*1

#kotae =int(mennseki_r / mennseki_1)
kotae=r*r
print(kotae)
# Judge status: Accepted
n=int(input())
c=input()
a=c.count('R')
print(a-c[:a].count('R'))
# Judge status: Accepted
# D - Teleporter
N,K = map(int,input().split())
A = [0]+list(map(int,input().split()))
s = {1:0}
l = [1]
i = 1
for j in range(1,10**10):
    i = A[i]
    if i in s:
        sigma = j-s[i]
        break
    s[i] = j
    l.append(i)
if K<s[i]:
    print(l[K])
else:
    K -= s[i]
    mod = l[s[i]:]
    print(mod[K%sigma])
# Judge status: Wrong Answer
n,x=map(int,input().split())
a=list(map(int,input().split()))
ans=0
count=0
for i in range(0,n-1):
  if a[i]+a[i+1]>x:
    ans=ans+a[i]+a[i+1]-x
    a[i+1]=a[i+1]-(a[i]+a[i+1]-x)
for i in range(n-1,0):
  if a[i]+a[i+1]>x:
    count=count+a[i]+a[i+1]-x
    a[i]=a[i]-(a[i]+a[i+1]-x)
print(min(ans,count))
# Judge status: Accepted
# coding: utf-8
import itertools

N, M, Q = map(int, input().split())
lst = [list(map(int, input().split())) for _ in range(Q)]
l = [i for i in range(1, M + 1)]
A = list(itertools.combinations_with_replacement(l, N))

maxans = 0

for j in A:
    ans = 0
    for i in lst:
        if j[i[1]-1] - j[i[0]-1] == i[2]:
            ans = ans + i[3]
    maxans = max(maxans, ans)

print(maxans)
# Judge status: Accepted
# coding: utf-8
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

K = ir()
A = np.arange(1, K+1, dtype=np.int32)
B = np.gcd.outer(np.gcd.outer(A, A), A)
answer = B.sum()
print(answer)
# Judge status: Accepted
n, m, *a = map(int, open(0).read().split());a.sort()
print(sum(sorted([abs(a[i+1]-a[i])for i in range(m-1)])[:max(0,m-n)]))
# Judge status: Accepted
kaisu = int(input())
keihin = [input() for i in range(kaisu)]
shurui = set(keihin)
print(len(shurui))
# Judge status: Wrong Answer
def main():
  n = int(input())
  i = int((n)**0.5) + 1
  while i * i > n: i -= 1
  while i >= 1:
    if n % i == 0:
      print(i+n//i)
      return
    i -= 1
main()
# Judge status: Accepted
def resolve():
    N = int(input())
    A = list(map(int, input().split(" ")))
    d = {0: 0}
    for a in A:
        if a in d:
            d[a] += 1
        else:
            d[a] = 1
    cnt = 0
    for i in d.keys():
        if d[i] >= i:
            cnt += d[i] - i
        else:
            cnt += d[i]
    print(cnt)

if '__main__' == __name__:
    resolve()
# Judge status: Accepted
n = int(input())

print((n/3)**3)
# Judge status: Accepted
A,B,C=list(map(int,input().split()))
ans=C-(A-B)
if(ans<0):
  ans=0
print(ans)
# Judge status: Wrong Answer
N = int(input())
for i in range(N):
    S = input().split()
    a = list(S)
    a.append(S)
    i += 1
print("AC" + " x " + str(a.count("AC")))
print("WA"+ " x "+ str(a.count("WA")))
print("TLE" + " x " + str(a.count("TLE")))
print("RE" + " x " + str(a.count("RE")))
# Judge status: Accepted
import sys

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def main():
    n = I()
    p = LI()
    ans = 0
    for i in range(1, n):
        if p[i-1] == i:
            temp = p[i-1]
            p[i-1] = p[i]
            p[i] = temp
            ans += 1
    if p[n-1] == n:
        ans += 1
    print(ans)

if __name__ == '__main__':
    main()
# Judge status: Accepted
N, M = map(int, input().split())
if N >= M/2:
  ans = M//2
else:
  ans = int((2*N + M)//4)
  
print(ans)
# Judge status: Wrong Answer
n = int(input())
print(int(n*(0+n-1)/2))
# Judge status: Accepted
A = int(input())
B = int(input())

print( 6-(A+B) )
# Judge status: Accepted

def resolve():
    N, X = map(int, input().split())
    A = list(map(int, input().split()))

    ans = 0
    for i in range(1, N):
        diff = max((A[i - 1] + A[i]) - X, 0)
        ans += diff
        A[i] = max(A[i] - diff, 0)

    print(ans)


if __name__ == "__main__":
    resolve()
# Judge status: Accepted
import math
a,b=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
c = math.ceil((a+b)/2)
print(c)
# Judge status: Accepted
n,a,b = map(int,input().split())
diff = abs(a-b)
 
if diff%2==0:
  print(diff//2)
else :
  print(min(a - 1, n - b) + 1 + diff // 2)
# Judge status: Accepted
N, M = map(int, input().split())
r = list([None]*N)
for i in range(M):
    s, c = map(int, input().split())
    if r[s-1] is not None and r[s-1] != c:
        print("-1")
        exit()
    r[s-1] = c

if N > 1 and r[0] == 0:
        print("-1")
        exit()

for i in range(len(r)):
    if r[i] is None:
        if N > 1 and i == 0:
            r[i] = 1
        else:
            r[i] = 0

print("".join(map(str, r)))
# Judge status: Accepted
K,N = (int(i) for i in input().split())
A = [int(i) for i in input().split()]
A.append(K+A[0])

max_distance = 0
for i in range(1,len(A)):
  max_distance = max(max_distance,A[i] - A[i-1])

ans = K - max_distance

print(ans)
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))

s = 0

b = [abs(x) for x in a]

if n % 2 == 0:
    s = sum(b)
else:
    s = sum(b) - 2 * min(b)

print(s)
# Judge status: Accepted
x, k, d = map(int, input().split())
if x >= 0:
    if x//d >= k:
        print(abs(x - k*d))
    else:
        if (k - x//d)%2 == 0:
            print(abs(x%d))
        else:
            print(abs(x%d - d))
else:
    if abs(x)//d >= k:
        print(abs(x + k*d))
    else:
        if (k - abs(x)//d)%2 == 0:
            print(abs(x)%d)
        else:
            print(d - abs(x)%d)
# Judge status: Wrong Answer
N, M = map(int, input().split())
for _ in range(M):
    a, b = input().split()
for i in range(1, N+1):
    print(a.count("i")+b.count("i"))
# Judge status: Accepted
n = int(input())
l = list(map(int, input().split()))
if max(l) * 2 < sum(l):
    print('Yes')
else:
    print('No')
# Judge status: Accepted
import sys
input = lambda: sys.stdin.readline().rstrip()

N = int(input())

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

neg_cnt = 0
minimum = 10**10
for num in A:
    minimum = min(minimum, abs(num))
    if num < 0:
        neg_cnt += 1
        
ans = 0
for num in A:
    if num < 0:
        ans += -num
    else:
        ans += num 

if neg_cnt % 2 == 0:
    print(ans)               
else:
    print(ans - minimum * 2)
# Judge status: Accepted
N, M = map(int, input().split())
print(M//2 if 2*N > M else N + (M-2*N)//4)
# Judge status: Accepted
n=int(input())
P=list(map(int,input().split()))
cnt=0
for i in range(1, n-1):
    r=P[i]
    q=P[i-1:i+2]
    q=sorted(q)
    if q[1]==r:
        cnt+=1
print(cnt)
# Judge status: Accepted
S = input()

ans = 'Good'

for i in range(3):
    if (S[i] == S[i + 1]):
        ans = 'Bad'

print(ans)
# Judge status: Wrong Answer
s = list(input())
if s[-1] == s:
    for i in s:
        print(i,end = "")
        print("es")
else:
    for i in s:
        print(i,end = "")
        print("s")
# Judge status: Accepted
import math

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

for i in range(min(41, K)):
  B = [0] * N
  for n, A_n in enumerate(A):
    B_min = max(0, n-A_n)
    b_max = min(N-1, n+A_n)
    B[B_min] += 1
    if b_max+1 < N:
      B[b_max+1] -= 1
  
  sum = 0
  for n in range(len(A)):
    sum += B[n]
    A[n] = sum

print(" ".join(list(map(str, A))))
# Judge status: Wrong Answer
n = int(input())
l = list(map(int,input().split()))
l.sort()
ans = 0
print(l)
for i in range(n):
    for j in range(i+1,n):
        val = l[i]+l[j]
        ng = n
        ok = j
        while abs(ok - ng) > 1:
            mid = (ok+ng)//2
            if val > l[mid]:
                ok = mid
            else:
                ng = mid


        print(i,j,ok,ng)

        ans += ok - j


print(ans)
# Judge status: Wrong Answer
# -*- coding : utf-8 -*-

S = str(input())

w = ""
if S[0] == "B":
  w = ""
else :
  w = w + S[0]

for i in range(1,len(S)):
  if S[i] == "B":
    if w == "":
      w = ""
    else :
      w = w.rstrip(S[i-1])
  else:
    w = w + S[i]

print(w)
# Judge status: Accepted
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")

s = input()
n = len(s)
last = []
ans = 0
i = 0
last = []
while i<n:
    if last and s[i]!=last[-1]:
        ans += 2
        last.pop()
        i += 1
    else:
        last.append(s[i])
        i += 1
print(ans)
# Judge status: Wrong Answer
q,h,s,d=map(int,input().split())
n=int(input())
ans=0
if n%2:
    ans+=min(4*q,2*h,s)
    n-=1
print(int(ans+n*min(4*q,2*h,s,d/2)))
# Judge status: Accepted
x = str(input())
if x == "a" or x == "i" or x == "u" or x == "e" or x == "o":
  print("vowel")
else:
  print("consonant")
# Judge status: Wrong Answer
n = int(input())
wa = 0
m = 0
l = list(map(int, input().split()))
for i in range(1, n):
    m = max(l[i], m)
    if m >= l[i]:
        wa += m - l[i]
print(wa)
# Judge status: Accepted
a, b = map(int, input().split())

ans = max(a+a-1, a+b, b+b-1)
print(ans)
# Judge status: Accepted
n = int(input())
A = [int(input()) for _ in range(n)]
maxA = max(A)
maxIdx = A.index(maxA)
for i in range(n):
  if i != maxIdx:
    print(maxA)
  else:
    print(max(A[:i] + A[i + 1:]))
# Judge status: Wrong Answer
n = int(input())

cash_out = 600 * n
count_back = n//15
cash_in = 200 *count_back

cash_net = cash_out - cash_in

print(cash_net)
# Judge status: Wrong Answer
# C - Reconciled?
N, M = map(int,input().split())

S = 1
for i in range(1,min(N,M)):
    S *= i % 1000000007

ans = 0
if abs(N-M) > 1:
    ans = 0
elif abs(N-M) == 1:
    ans = S*S*max(N,M)
else:
    ans = S*S*2

ans = ans % 1000000007

print(ans)
# Judge status: Accepted
A,B = map(int,input().split())
if A >= 13:
    print(B)
elif A >= 6 and A <= 12:
    print(int(B/2))
elif A <= 5:
    print(0)
# Judge status: Accepted
n = int(input())
X = list(map(int, input().split()))
S = sorted(X)
t = S[n//2]
s = S[n//2-1]
for i in range(n):
  if X[i] >= t: print(s)
  else: print(t)
# Judge status: Wrong Answer
import math
#def getTotal(now_depo, now_year, goal):
#  if(now_depo >= goal):
#    return now_year
#  else:
#    return getTotal(math.floor(now_depo * 1.01), now_year + 1, goal)

goal = int(input())
depo = 100
#print(getTotal(depo, 0, goal))
now_year = 0
while (True):
  depo = math.floor(depo * 1.01)
  now_year += 1
  if(depo >= goal):
    print(now_year)
    break
# Judge status: Accepted
S = input()

A = S.index("A")
Z = len(S) - S[::-1].index("Z")

print(Z-A)
# Judge status: Accepted
import math
s = int(input())
if s < 3:
    print("0")
else:
    bar = (s // 3) - 1
    ans = 0
    for i in range(bar+1):
        if i == 0:
            ans += 1
        else:
            val = s - 3 * (i+1)
            count = math.factorial(val+i) // (math.factorial(val) * math.factorial(i))
            ans += count % (10**9+7)
    print(ans%(10**9+7))
# Judge status: Wrong Answer
N,K = map(int,input().split())
H = list(map(int,input().split()))
if K==0:
    print(sum(H))
elif N>K:
    x=max(H)
    print(sum(H)-x)
else:
    print(0)
# Judge status: Accepted
from fractions import gcd
a,b,c,d = map(int, input().split())
x = (c*d) // gcd(c,d)
c1, d1, cd1 = b // c, b // d, b // x
c2, d2, cd2 = (a-1) // c, (a-1) // d, (a-1) // x
ans = (c1+d1-cd1) - (c2+d2-cd2)
print(b-a+1-ans)
# Judge status: Accepted
a,s,c = input().split()

print("A"+s[0]+"C")
# Judge status: Accepted
from collections import deque

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

b = deque()
for i in range(n):
    if i % 2 == n % 2:
        b.append(A[i])
    else:
        b.appendleft(A[i])

print(" ".join(list(b)))
# Judge status: Accepted
n = int(input())

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

buka = [0]*n

for i in range(n-1):
    buka[a[i]-1] += 1

for i in range(n):
    print(buka[i])
# Judge status: Wrong Answer
K, A, B = map(int, input().split())
if B - A <= 2  or K <= A:
  print(K + 1)
else:
  print(A + ((K - A + 1) // 2) * (B - A)  + ((K - A + 1) // 2))
# Judge status: Accepted
if __name__ == "__main__":
    n = int(input())
    w = list()
    for i in range(n):
        w.append(input())

    t = set(w)
    if len(t) != n:
        print('No')
        exit()

    end = w[0][-1]
    for i in range(1, n):
        if w[i][0] != end:
            print('No')
            exit()
        end = w[i][-1]

    print('Yes')
# Judge status: Wrong Answer
n,k = map(int, input().split())
rate_total = []

for i in range(1,n+1):
    score = i
    rate = 1/n
    while(score < 10):
        rate *= (1/2)
        score  *= 2
    rate_total.append(rate)

print(sum(rate_total))
# Judge status: Accepted

def solve():
    if N >= M:
        return 0
    elif N == 1:
        cnt = abs(X[-1] - X[0])
        return cnt
    L = [0] * (M-1)
    
    for i in range(len(L)):
        L[i] = X[i+1] - X[i]
    L.sort()
    return sum(L[:M-N])



if __name__=="__main__":
    N,M = list(map(int, input().split()))
    X = list(map(int, input().split()))
    X.sort()
    print(solve())
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
ans=0
for i in range(1,n):
    if a[i]<a[i-1]:
        ans+=a[i-1]-a[i]
        a[i]=a[i-1]
print(ans)
# Judge status: Wrong Answer
A,B,C=map(int,input().split());print(C-A+B)
# Judge status: Accepted


def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def solve():
    N = read_int()
    answer = 0
    last = 0
    for _ in range(N):
        a = read_int()
        if a != 0:
            answer += (last+a)//2
            last = (last+a)%2
        else:
            last = 0
    return answer


if __name__ == '__main__':
    print(solve())
# Judge status: Accepted
n=int(input())
a=input().split()
numbers=[b for b in a]
n=len(numbers)
if n%2==0:
    kisuu=numbers[1::2]
    guusuu=numbers[0::2]
    kisuu.reverse()
    kotae=kisuu+guusuu
else:
    kisuu=numbers[1::2]
    guusuu=numbers[0::2]
    guusuu.reverse()
    kotae=guusuu+kisuu
answer=''
for z in kotae:
    answer+=str(z)
    answer+=' '
print(answer)
# Judge status: Wrong Answer
a=int(input())
print(a+a^2+a^3)
# Judge status: Accepted
from sys import stdin
import math


N = int(stdin.readline().rstrip())

A=0
B=N-A


def sum_of_digit(n):
    total = 0
    s = str(n)
    for i in range(len(s)):
        total = total + int(s[i:i+1])

    return total


minimum = 9999999999

for a in range(1,N):
    a_total = sum_of_digit(a)
    b = N - a
    b_total = sum_of_digit(b)
    minimum = min(minimum, a_total + b_total)

print(minimum)
# Judge status: Accepted
S=input()

ans=''
for _ in range(len(S)):
  ans+='x'
print(ans)
# Judge status: Accepted
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    from itertools import accumulate

    N = int(input())  # len(A)
    A = list(map(int, input().split()))
    zenbu=sum(A)
    B = [0] + A
    B = list(accumulate(B))
    C = [zenbu]*(N+1)
    import numpy as np
    B=np.array(B)
    C=np.array(C)
    D=C-B
    ans=10**18
    for i in range(1, N):
        ans = min(abs(B[i]-D[i]),ans)
    print(ans)
resolve()
# Judge status: Wrong Answer
import sys
import math

a, b, c = map(int, input().split())
ma=max(a, max(b, c))
if 3 *ma %2 ==(a + b + c)%2:
    print((3 * ma) - (a + b + c)// 2)
else:
    print((3 * (ma+1)) - (a + b + c)// 2)
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
x=[]
ans=1

for i in range(n-1):
  if a[i+1]==a[i]:
    continue
  x.append(a[i+1]-a[i])
  
flag=True

for i in range(len(x)-1):
  if flag==False:
    flag=True
    continue
  if x[i]<0 and x[i+1]>0 or x[i]>0 and x[i+1]<0:
    ans+=1
    flag=False
    

print(ans)
# Judge status: Accepted
S=input()
if S[-1:]=="s":
    print(S+"es")
else:
    print(S+"s")
# Judge status: Accepted
a=[list(map(int,input().split())) for _ in range(3)]
f=[[0]*3 for _ in range(3)]
for _ in range(int(input())):
  x=int(input())
  for i in range(3):
    for j in range(3):
      if x==a[i][j]:
        f[i][j]=1
ans=0
for i in range(3):
  if all(f[i][j] for j in range(3)) or all(f[j][i] for j in range(3)):
    ans=1
if f[0][0]==f[1][1]==f[2][2]==1 or f[0][2]==f[1][1]==f[2][0]==1:
  ans=1
print("Yes" if ans else "No")
# Judge status: Accepted
a, b, c = map(int, input().split())

if a < b:
    if a < c and c < b:
        print('Yes')
    else:
        print('No')
else:
    if b < c and c < a:
        print('Yes')
    else:
        print('No')
# Judge status: Accepted
s, t = input(), input()
for i in range(len(t)):
    if s == t:
        print('Yes')
        exit()
    s = s[1:] + s[:1]
print('No')
# Judge status: Wrong Answer
n, d = map(int, input().split())
count = 0
for i in range(n):
  x, y = map(int, input().split())
  if pow((pow(x, 2) + pow(y, 2)), 0.5) >= d:
    count += 1
print(count)
# Judge status: Wrong Answer
n, x, t = map(int, input().split())
if n%x == 0:
    print(n//x * t)
else:
    print((n//x + 1)+t)
# Judge status: Wrong Answer
import collections
N = int(input())
A = [int(x) for x in input().split()]
c = collections.Counter(A)
cc = {k:v for k, v in c.items() if v>1}
if len(cc) > 1:
    ccc = sorted(list(cc.keys()))[-2:]
    print(ccc[0] * ccc[1])
elif len(cc)==1 and max(cc.values()) > 3:
    print(cc.popitem()[0] * 2)
else:
    print(0)
# Judge status: Accepted
n=int(input())
li=list(map(int,input().split()))
d={}
dif={-1}
ans={}
for i in range(n):
    if li[i] not in dif:
        dif|={li[i]}
    if d.get(li[i])!=None:
        d[li[i]]+=1
    else:
        d[li[i]]=1
dif.remove(-1)
g=0
for i in dif:
    g+=d[i]*(d[i]-1)//2
for i in dif:
    ans[i]=g-(d[i]-1)*d[i]//2+(d[i]-2)*(d[i]-1)//2
for i in li:
    print(ans[i])
# Judge status: Accepted
n = int(input())
s = input()

lst = []
for i in range(1,n-1):
    left = s[:i]
    right = s[i:]

    cnt = 0
    for j in set(left):
        if j in set(right):
            cnt += 1
    lst.append(cnt)

if not lst:
    print(0)
else:
    print(max(lst))
# Judge status: Wrong Answer
n,m=map(int,input().split())
l_n=[list(map(int,input().split())) for _ in range(n)]
l_m=[list(map(int,input().split())) for _ in range(m)]

for i,j in l_n:
    distance=0
    cnt = 0
    ans = float ( "inf" )
    for k,l in enumerate(l_m):
        a,b=l
        distance=(i-a)**2+(j-b)**2
        if ans>distance:
            ans=min(ans,distance)
            cnt=k+1
    print(cnt)
# Judge status: Accepted
def main():
    X, Y = map(int, input().split())
    flag = False
    for i in range(0, X+1):
        for j in range(0, X+1):
            if i + j == X and i*2 + j*4 == Y:
                flag = True
    
    if flag:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()
# Judge status: Accepted
import sys
s = int(input())
def collatz(n):
    if n%2 == 0:
        return (n//2)
    else:
        return 3*n+1
A = [s]
while True:
    A.append(collatz(A[-1]))
    for i in range(0,len(A)):
        for j in range(0,len(A)):
            if A[i] == A[j] and i!= j:
                print(j+1)
                sys.exit(0)
# Judge status: Accepted
txt = input()
n = int(input())
for i in range(n):
  if txt[i] != '1':
    print(txt[i])
    break
else:
  print("1")
# Judge status: Wrong Answer
h=int(input())
w=int(input())
n=int(input())
x = n/(h if w <= h else w)
print(x if int(x) == x else int(x)+1)
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
if a==b and b==c: print('No')
elif a!=b and b!=c:print('No')
else:print('Yes')
# Judge status: Wrong Answer
a,b,c,x,y=map(int,input().split());print(min(c*2*min(x,y)+abs(x-y)*min(a,b,2*c),a*x+b*y))
# Judge status: Accepted
n = int(input())
s = input()

mozi = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]

for x in s:
  number = mozi.index(x) + n
  if number > 25:
    number = number - 26
  print(mozi[number], end="")
# Judge status: Wrong Answer
def lunlun(x):
    c=0
    l=list(str(x))
    for i in range(len(l)):
        l[i]=int(l[i])
    l.sort()
    c=0
    for i in range(1,len(l)):
        if abs(l[i]-l[i-1])<=1:
            c=c+1
    if c==len(l)-1:
        return True
    else:
        return False
    
n=int(input())
c=0
i=1
while c!=n:
    if lunlun(i):
        c=c+1
    i=i+1
print(i-1)
# Judge status: Accepted
import bisect
n,k = map(int,input().split())
x = list(map(int,input().split()))
zero = bisect.bisect(x,0)
left = [0] + (x[:zero])[::-1]
right = [0] + x[zero:]
ans = 10**12
for i in range(min(k+1,len(left))):
  j = k-i
  if j >= len(right):
    continue
  ans = min(ans,2*right[j]-left[i],-2*left[i]+right[j])
print(ans)
# Judge status: Accepted
# 与えられた数値の桁数と桁値の総和を計算する.
def calc_digit_sum(num):
    digits = sums = 0
    while num > 0:
        digits += 1
        sums += num % 10
        num //= 10
    return digits, sums


cnt = 0
a, b, k = map(int, input().split())
for num in range(max(a, b), -1, -1):
    if a % num == 0 and b % num == 0:
        cnt += 1
        if k == cnt:
            print(num)
            exit()
# Judge status: Accepted
n, a, b = map(int, input().split())
if (b - a) % 2 == 0:
    print(-(-(b - a) // 2))
else:
    print(min(a - 1 + -(-(b - a + 1) // 2), n - b + -(-(b - a) // 2)))
# Judge status: Accepted
L,R = map(int,input().split())
ans = 4000

for i in range(L,R+1):
    for j in range(i+1,R+1):
        ans = min(ans,i*j%2019)
        if ans == 0:
            break
    else:
        continue
    break
print(ans)
# Judge status: Accepted
N = int(input())
l = [0] + [0] * N
for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            temp = x**2 + y**2 + z**2 + x * y + y * z + z * x
            if temp <= N:
                l[temp] += 1

# print(l)
for i in range(1, N + 1):
    print(l[i])
# Judge status: Accepted
pqr = list(map(int, input().split()))

print(sum(pqr) - max(pqr))
# Judge status: Accepted
X,Y = map(int,input().split())

if X%Y == 0:
    print(-1)
else:
    print(X)