Harryxun/stf_run huggingface dataset:
import numpy as np

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

if N == 0:
  print(X)
  exit()
  
p_list = list(map(int, input().split()))

num_list = list(set([*range(1,101)]) - set(p_list))

diff = np.abs(np.array(num_list)-X)
diff_arg_min = np.argmin(diff)

print(num_list[diff_arg_min])

### FIXED CODE ###

import numpy as np

X, N = list(map(int, input().split()))
p_list = set(sorted(list(map(int, input().split()))))

if N == 0:
  print(X)
  exit()
  
i = sorted(list(set(range(X-N, X+1)) - p_list))[-1]
j = sorted(list(set(range(X, X+N+1)) - p_list))[0]

if X-i <= j-X:
  print(i)
else:
  print(j)
def find_num(lst, value):
    return [i for i, x in enumerate(lst) if x == value]

def resolve():
    X,N = map(int,input().split())
    if N == 0:
        print(X)
    else:
        p = list(map(int,input().split()))
        p.sort()
        idx = find_num(p,X)
        if idx == []:
            print(X)
        else:
            for i in range(1,100):
                if p[idx[0] - i ] != X - i or idx[0] - i == -1:
                    print(X-i)
                    break
                if p[idx[0] + i ] != X + i or idx[0] + i == N:
                    print(X+i)
                    break
resolve()

### FIXED CODE ###

def find_num(lst, value):
    return [i for i, x in enumerate(lst) if x == value]

def resolve():
    X,N = map(int,input().split())
    if N == 0:
        print(X)
    else:
        p = list(map(int,input().split()))
        p.sort()
        idx = find_num(p,X)
        if idx == []:
            print(X)
        else:
            for i in range(1,100):
                if p[idx[0] - i ] != X - i or idx[0] - i == -1:
                    print(X-i)
                    break
                if idx[0] + i == N:
                    print(X+i)
                    break
                elif p[idx[0] + i ] != X + i:
                    print(X+i)
                    break
resolve()
S = input()

if S[0] == S[1]:
  print(Bad)
elif S[1] == S[2]:
  print(Bad)
elif S[2] == S[3]:
  print(Bad)
else
	print(Good)
  
  

### FIXED CODE ###

s =input()

if s[0] == s[1]:
  print('Bad')
elif s[1] == s[2]:
  print('Bad')
elif s[2] == s[3]:
  print('Bad')
else:
  print('Good')
n, a, b, k = [int(i) for i in input().split()]
p = 998244353

def fact(n, p):
    n_ = 1
    yield n_
    for i in range(1, n+1):
         n_ = (n_*i) % p
         yield n_

def invfact(n, f, p):
    m = pow(f[n], p-2, p)
    yield m
    for i in range(n, 0, -1):
        m = m * i % p
        yield m

f = list(fact(n, p))
rf = list(invfact(n, f, p))
rf.reverse()
ans = 0

for x in range(n+1):
    y = (k-x*a)/b
    if not y.is_integer():
        continue
    y = int(y)

    ans += (f[n] * rf[x] % p * rf[n-x] % p) * (f[n] * rf[y] % p * rf[n-y] % p) % p

print(ans%p)

### FIXED CODE ###

n, a, b, k = [int(i) for i in input().split()]
p = 998244353

def fact(n, p):
    n_ = 1
    yield n_
    for i in range(1, n+1):
         n_ = (n_*i) % p
         yield n_

def invfact(n, f, p):
    m = pow(f[n], p-2, p)
    yield m
    for i in range(n, 0, -1):
        m = m * i % p
        yield m

f = list(fact(n+1, p))
rf = list(invfact(n+1, f, p))
rf.reverse()
ans = 0

for x in range(n+1):
    y = (k-x*a)/b
    if not y.is_integer() or y > n or y < 0:
        continue
    y = int(y)

    ans += (f[n] * rf[x] % p * rf[n-x] % p) * (f[n] * rf[y] % p * rf[n-y] % p) % p

print(ans%p)
N = int(input())
A = list(map(int,input().split()))
Asort = sorted([A[i]-i-1 for i in range(N)])

if N%2 == 0:
    b_tmp = Asort[N//2]
else:
    b_tmp = (Asort[N//2] + Asort[N//2 + 1])// 2
# print(b_tmp)
minA = 10**9
for b in range(b_tmp-1,b_tmp+2):
    submin = [abs(A[i]-b-i-1) for i in range(N)]
    # print(submin)
    minA = min(sum(submin),minA)

print(minA)

### FIXED CODE ###

from statistics import median

N = int(input())
A = list(map(int,input().split()))
Asort = sorted([A[i]-i-1 for i in range(N)])
# print(Asort)

b_tmp = int(median(Asort))

submin = [abs(A[i]-b_tmp-i-1) for i in range(N)]
# print(submin)
minA = sum(submin)

print(minA)
N,K=map(int, input().split())
p = list(map(int, input().split()))

p = [(N+1)/2 for n in p]
import numpy as np
s = np.cumsum(p)

max_e=0
for i in range(N-K+1):
  e=s[i+K]-s[i]
  max_e = max(max_e, e)
    
print(max_e)

### FIXED CODE ###

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

p = [(n+1)/2 for n in p]
import numpy as np
s = np.cumsum(p)

e=s[K-1]
max_e=e
for i in range(1,N-K):
  e=s[i+K]-s[i]
  max_e = max(max_e, e)
    
print(max_e)
n = int(input())
a = list(map(int, input().split()))
b, idx = zip(*sorted(zip(a, range(1, n))))
if b[-1] < 0:
    print(n - 1)
    # 全て負の数なので後ろから累積和をとる
    for i in range(n - 1):
        print(n - i, n - i - 1)
elif b[0] >= 0:
    print(n - 1)
    for i in range(n - 1):
        print(i + 1, i + 2)
else:
    # max or min を足して全て正の数に直す
    print(2 * n - 2)
    if b[-1] > abs(b[0]):
        # add max
        for i in range(n - 1):
            print(idx[n - 1], i + 1)
        for i in range(n - 1):
            print(i + 1, i + 2)
    else:
        for i in range(n - 1):
            print(idx[0], i + 2)
        for i in range(n - 1):
            print(n - i, n - i - 1)


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
b, idx = zip(*sorted(zip(a, range(1, n + 1))))
if b[-1] < 0:
    print(n - 1)
    # 全て負の数なので後ろから累積和をとる
    for i in range(n - 1):
        print(n - i, n - i - 1)
elif b[0] >= 0:
    print(n - 1)
    for i in range(n - 1):
        print(i + 1, i + 2)
else:
    # max or min を足して全て正の数に直す
    print(2 * n - 2)
    if b[-1] > abs(b[0]):
        # add max
        for i in range(n):
            if i + 1 != idx[-1]:
                print(idx[-1], i + 1)
        for i in range(n - 1):
            print(i + 1, i + 2)
    else:
        for i in range(n):
            if i + 1 != idx[0]:
                print(idx[0], i + 1)
        for i in range(n - 1):
            print(n - i, n - i - 1)
time = input('time')
xtimes = input('xtimes')

A = int(time) / int(xtimes)

print(A)

### FIXED CODE ###

list = list(map(int, input().split()))
A = int(list[0]) / int(list[1])
print(A)
H,W=map(int,input().split())
N=int(input())
A=list(map(int,input().split()))

nc=1
nct=A[0]
ans=[]
for y in range(H):
  if y%2==0:
    st=""
    for x in range(W):
      nct-=1
      st+=str(nc)
      if nct==0 and nc!=N:
        nct=A[nc]
        nc+=1
  else:
    st=""
    for x in range(W-1,-1,-1):
      nc-=1
      st+=str(nc)
      if nct==0 and nc!=N:
        nct=A[nc]
        nc+=1
    st="".join(list(reversed(st)))
  ans.append(st)
        
      
for y in range(H):
  print(ans[y])

### FIXED CODE ###

H,W=map(int,input().split())
N=int(input())
A=list(map(int,input().split()))
ANS = [ [0]*W for _ in range(H)]
nc=1
nct=A[0]
ans=[]
for y in range(H):
  if y%2==0:
    for x in range(W):
      nct-=1
      ANS[y][x] = str(nc)
      if nct==0 and nc<N:
        nct=A[nc]
        nc+=1
  else:
    for x in range(W-1,-1,-1):
      nct-=1
      ANS[y][x] = str(nc) 
      if nct==0 and nc<N:
        nct=A[nc]
        nc+=1
        
      
for y in range(H):
    print(" ".join(ANS[y]) )
n=input()
import math
a = []
for i in range(0,math.ceil(n/2),2):
  a.append(str(a[i]))
print(*a)

### FIXED CODE ###

n=input()
a = []
a.append(str(n[:len(n):2]))
print(*a)
a,b = map(int, input().split)
  
  if a*b % 2 == 0:
    print("Even")
  else:
    print("Odd")


### FIXED CODE ###

a, b = map(int, input().split())
print("Odd" if a * b % 2 else "Even")
li=a,b,c=list(map(int,input().split()))
lis=sorted(li)
print(lis[2]-lis[0)


### FIXED CODE ###

li=a,b,c=list(map(int,input().split()))
lis=sorted(li)
print(lis[2]-lis[0])
import fractions
n,x=map(int,input().split())
a=list(map(int,input().split()))
ans=abs(x-a[0])
a.sort()
if n==1:
    print(abs(x-a[0]))
else:
    cnt=abs(a[1]-a[0])
    for j in range(n-1):
        cnt=min(abs(a[j+1]-a[j]),cnt)
    for i in range(n):
        ans=min(abs(x-a[i]),ans)
    print(min(ans,cnt))
    

### FIXED CODE ###

a,b=map(int,input().split())
if a%2!=0 and b%2!=0:
    print('Yes')
else:
    print('No')
a[0],a[1],a[2] = map(int, raw_input().split())

i = 1
while i < 3 :
    j = i - 1
    while j >= 0:
        if a[j] > a[j+1]:
             t = a[j]
             a[j] = a[j+1]
             a[j+1] = t
        else:
            break
        j -= 1
    i += 1

print a[0],a[1],a[2]

### FIXED CODE ###

a,b,c = sorted(map(int, raw_input().split()))
print a,b,c
import sys
import math
# sys.stdin=open('input.txt','r')
# sys.stdout=open('output2.txt','w')
from sys import stdin,stdout
from collections import deque,defaultdict
from math import ceil,floor,inf,sqrt,factorial,gcd,log2
from copy import deepcopy
ii1=lambda:int(stdin.readline().strip())
is1=lambda:stdin.readline().strip()
iia=lambda:list(map(int,stdin.readline().strip().split()))
isa=lambda:stdin.readline().strip().split()
mod=1000000007

n=ii1()
arr=iia()
arr.sort(reverse=True)
ans=0
for i in range(1,n):
    ans+=arr[i//2]
print(ans)


### FIXED CODE ###

import sys
import math
# sys.stdin=open('input.txt','r')
# sys.stdout=open('output2.txt','w')
from sys import stdin,stdout
from collections import deque,defaultdict
from math import ceil,floor,inf,sqrt,factorial,gcd,log2
from copy import deepcopy
ii1=lambda:int(stdin.readline().strip())
is1=lambda:stdin.readline().strip()
iia=lambda:list(map(int,stdin.readline().strip().split()))
isa=lambda:stdin.readline().strip().split()
mod=1000000007

n=ii1()
ans=1000*(1+ n//1000)
if n%1000==0:
    print(0)
else:
    print(ans-n)
# - coding : utf-8 -*-

if __name__ == "__main__":

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

    p = [1] * 41
    for i in range(40):
        p[i+1] = p[i] * 2

    import pdb;pdb.set_trace()
        
    ans = 0
    x = 0
    for i in range(41):
        t = p[40-i]
        if x + t > k:
            cnt = 0
            for j in range(n):
                if an[j] & t == t:
                    cnt += 1
            ans += cnt * t
        else:
            cnt = 0
            for j in range(n):
                if an[j] & t == t:
                    cnt += 1
            if cnt <= n/2:
                x += t
            ans += max(cnt, n-cnt) * t
    print(ans)

### FIXED CODE ###

# - coding : utf-8 -*-

if __name__ == "__main__":

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

    p = [1] * 41
    for i in range(40):
        p[i+1] = p[i] * 2
        
    ans = 0
    x = 0
    for i in range(41):
        t = p[40-i]
        if x + t > k:
            cnt = 0
            for j in range(n):
                if an[j] & t == t:
                    cnt += 1
            ans += cnt * t
        else:
            cnt = 0
            for j in range(n):
                if an[j] & t == t:
                    cnt += 1
            if cnt <= n/2:
                x += t
            ans += max(cnt, n-cnt) * t
    print(ans)
import math
r = int(input())
print(2 * r * math.pi)

### FIXED CODE ###

n, m = map(int, input().split())
a = list(map(int, input().split()))
ans = n - sum(a) if n - sum(a) >= 0 else -1
print(ans)
a=[int(input())]
if a==("ABC"):
	print("ARC")
else:
  	print("ABC")
 

### FIXED CODE ###

a=input()

if a =="ABC":
    print("ARC")
else:
    print("ABC")
#!/usr/bin/env python3
import sys
import math
import random



def solve(N, A):
    left = [A[0]]
    right = [A[N-1]]
    for i in range(1, N):
        left.append(math.gcd(left[i-1], A[i]))
    for i,j in zip(range(1,N),range(N-2, -1, -1)):
        right.append(math.gcd(right[i-1], A[j]))

    result = -1
    max_value = -1

    for i in range(N):
        if i == 0:
            current_value = right[N-2]
        elif i == N-1:
            current_value = left[N-2]
        else:
            current_value = math.gcd(left[i-1], right[N-i-2])
        if current_value > max_value:
            max_value = current_value
    print(max_value)

# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [ int(next(tokens)) for _ in range(N) ]  # type: "List[int]"
    solve(N, A)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys
import math
import random


def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y) #再帰定義

def solve(N, A):
    left = [A[0]]
    right = [A[N-1]]
    for i in range(1, N):
        left.append(gcd(left[i-1], A[i]))
    for i,j in zip(range(1,N),range(N-2, -1, -1)):
        right.append(gcd(right[i-1], A[j]))

    result = -1
    max_value = -1

    for i in range(N):
        if i == 0:
            current_value = right[N-2]
        elif i == N-1:
            current_value = left[N-2]
        else:
            current_value = gcd(left[i-1], right[N-i-2])
        if current_value > max_value:
            max_value = current_value
    print(max_value)

# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [ int(next(tokens)) for _ in range(N) ]  # type: "List[int]"
    solve(N, A)

if __name__ == '__main__':
    main()
a = list(map(int,input().split()))
num=0
for l in range(a[0]+1):
    for m in range(a[0]+1):
        if(a[1]-l-m <= k):
            num+=1


### FIXED CODE ###

inputs= list(map(int,input().split()))
k = inputs[0]
s = inputs[1]
answer = 0
for i in range(k+1):
  x = i
  for l in range(k+1):
    y = l
    z = s-x-y
    if z >= 0 and z <= k :
      answer += 1
print(answer)
a=input().split(" ")
b=int(a[0])
c=int(a[1])
a.sort(b,c)
if c==0:
  print(b[0],c[0]) 


### FIXED CODE ###

while True :    
    b = list(map(int,input().split()))
    b.sort()
    if b[1]==0:
        break
    print(b[0],b[1])
x = input().split()
N,T = int(x[0]),int(x[1])
a = []
b = []
c = []
d = []
for i in range(N):
    v = input().split()
    v = [int(s) for s in v]
    a.append(v)
for i in range(N):
    b.append(a[i][0])
for i in range(N):
    c.append(a[i][1])
for i in range(N):
    if b[i] < T:
        d.append(a[b.index(b[i])][0])
if len([i for i, x in enumerate(d) if x == min(d)]) == 1 and [i for i, x in enumerate(d) if x == min(d)] != [0]:
    print(min(d))
else:
    print('TLE')

### FIXED CODE ###

a = int(input())
if a == 1:
    print('Hello World')
else:
    b = int(input())
    c = int(input())
    print(b + c)
import math

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


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


print(lcm(a, b))


### FIXED CODE ###

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


def gcd(x, y):
    while y:
        x, y = y, x % y
    return x


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


print(lcm(a, b))
N = int(input())

def dfs(s):
  if int(s) > N: #sがNより大きくなったら再帰終了
    return 0
  ret = 1 if all(s.count(c) > 0 for c in '753') else 0　#sが七五三数ならretに1を入れる
  for c in '753':
    ret += dfs(s+c)
  return ret

print(dfs('0'))　#s='0'からスタート

### FIXED CODE ###

N = int(input())
 
def dfs(s):
  if int(s) > N: 
    return 0
  ret = 1 if all(s.count(c) > 0 for c in '753') else 0
  for c in '753':
    ret += dfs(s+c)
  return ret
 
print(dfs('0'))
s = input()
if s[5] == "1":
    print("TBD")
elif s[6] == "4" or s[6] == "3" s[6] == "2" s[6] == "1":
    print("Heisei")
else:
    print("TBD")

### FIXED CODE ###

s = input()
if s[5] == "1":
    print("TBD")
elif s[6] == "4" or s[6] == "3" or s[6] == "2" or s[6] == "1":
    print("Heisei")
else:
    print("TBD")
from heapq import heappush, heappop
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations
import sys
import bisect
import string
sys.setrecursionlimit(10**6)
def SI():
    return input().split()
def MI():
    return map(int,input().split())
def I():
    return int(input())
def LI():
    return [int(i) for i in input().split()]
YN=['Yes','No']
mo=10**9+7
alp=string.ascii_lowercase
d_al=dict([(i,j) for j,i in enumerate(alp)])

s=[d_al[i] for i in input()]
t=[d_al[i] for i in input()]
Ss=set(s)
St=set(t)
ns=len(s)
nt=len(t)
ss=s*2
#print(ss)

g=[{} for _ in range(ns)]
pos=[-1]*26
for i in range(ns*2)[::-1]:
    for j in Ss:
        if i<ns:
            g[i][j]=pos[j]-i
    pos[ss[i]]=i
#for i in range(len(g)):
#    print(g[i])

if len(St-Ss)!=0:
    ans=-1
else:
    cur=0
    ans=1+g[-1][t[0]]
    cur+=g[-1][t[0]]
    for i in range(1,nt):
        #print(cur,s[cur],'tg=',t[i],g[cur][t[i]])
        ans+=g[cur][t[i]]
        cur+=g[cur][t[i]]
        cur%=ns
print(ans)#,loop,has)


### FIXED CODE ###

from heapq import heappush, heappop
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations
import sys
import bisect
import string
sys.setrecursionlimit(10**6)
def SI():
    return input().split()
def MI():
    return map(int,input().split())
def I():
    return int(input())
def LI():
    return [int(i) for i in input().split()]
YN=['Yes','No']
mo=10**9+7
alp=string.ascii_lowercase
d_al=dict([(i,j) for j,i in enumerate(alp)])

s=[d_al[i] for i in input()]
t=[d_al[i] for i in input()]
Ss=set(s)
St=set(t)
ns=len(s)
nt=len(t)
ss=s*2
#print(ss)

g=[{} for _ in range(ns)]
pos=[-1]*26
for i in range(ns*2)[::-1]:
    for j in Ss:
        if i<ns:
            g[i][j]=pos[j]-i
    pos[ss[i]]=i
#for i in range(len(g)):
#    print(g[i])

if len(St-Ss)!=0:
    ans=-1
else:
    cur=0
    cur+=g[-1][t[0]]-1
    #print(cur)
    for i in range(1,nt):
        #print(cur,s[cur%ns],'tg=',t[i],g[cur%ns][t[i]])
        cur+=g[cur%ns][t[i]]
    ans=cur+1
print(ans)
N = int(input())
H = list(map(int, input().split()))
for i in range(N-1) :
    for k in range(i+1, N):
        if s[i] - s[k] > 1 :
            print('No')
            break
        else:
            print('Yes')


### FIXED CODE ###

N = int(input())
H = list(map(int, input().split()))
H[0] -= 1
for i in range(N - 1):
    if H[i] < H[i+1] :
        H[i+1] -= 1

    elif H[i] > H[i+1]:
        print('No')
        exit()

print('Yes')
import numpy as np
#A = np.array([int(i) for i in input().split()])
#N=int(input())

N=int(input())
A = np.array([int(i) for i in input().split()])
p=np.zeros(N)
for i in range(N-1):
    p[A[i]-1]+=1
for i in range(N):
    print(int(p[i]))

### FIXED CODE ###

N=int(input())
A=[int (x) for x in input().split()]
p=[0]*N
for i in range(N-1):
    p[A[i]-1]+=1
for i in range(N):
    print(int(p[i]))
#!/usr/bin/env python
# coding: utf-8

# In[1]:


import sys
input = sys.stdin.readline
N, M = map(int, input().split())
A = list(map(int, input().split()))
bcs = [list(map(int, input().split())) for i in range(M)]
"""
10 3
1 8 5 7 100 4 52 33 13 5
3 10
4 30
1 4
"""


# In[14]:


def binary_search(nbs, tar):
    #print(nbs, tar)
    ln = 0
    rn = len(nbs)-1
    t = int(len(nbs)/2)
    
    while ln < rn:
        comp = nbs[t]
        if tar >= comp and tar<nbs[t+1]:
            break
        elif tar >= comp: # 今の値がtar以下であれば、
            ln = t + 1 # 左端をt+1に更新
        elif tar < comp: # 今の値が
            rn = t - 1 # 右端をt-1に更新
        t = int((ln+rn)/2)
    return t


# In[16]:


sbcs = sorted(bcs, key=lambda x:x[1], reverse=True)
nb = 0
sA = sorted(A)
#print(sA)
#print(sbcs)
for i in range(M):
    if nb >= N: # nbがN以上になれば、終了
        break
    
    B, C = sbcs[i]
    #print(B, C, nb)
    if sA[nb] >= C: # もしnb個目がCより大きければ、終了
        break
    if sA[nb+B-1] <= C: #もしB個目が、Cより小さければ、B個目までをCにする
        sA[nb:nb+B] = [C]*B
        nb += B
        continue
    
    t = binary_search(sA[nb:nb+B], C)
    #print(t)
    sA[nb:nb+t+1] = [C]*(t+1)
    nb += t+1
#print(sA)
print(sum(sA))


# In[ ]:






### FIXED CODE ###

#!/usr/bin/env python
# coding: utf-8

# In[1]:


import sys
input = sys.stdin.readline
N, M = map(int, input().split())
A = list(map(int, input().split()))
bcs = [list(map(int, input().split())) for i in range(M)]


# In[14]:


"""
def binary_search(nbs, tar):
    #print(nbs, tar)
    ln = 0
    rn = len(nbs)-1
    t = int(len(nbs)/2)
    
    while ln < rn:
        comp = nbs[t]
        if tar >= comp and tar<nbs[t+1]:
            break
        elif tar >= comp: # 今の値がtar以下であれば、
            ln = t + 1 # 左端をt+1に更新
        elif tar < comp: # 今の値がtarより大きければ、
            rn = t - 1 # 右端をt-1に更新
        t = int((ln+rn)/2)
    return t
"""


# In[16]:


sbcs = sorted(bcs, key=lambda x:x[1], reverse=True)
sA = sorted(A)

nb = 0
ans = 0
is_finish = False

for i in range(M):
    B, C = sbcs[i]
    
    for j in range(B):
        if nb < N and sA[nb] < C:
            ans += C
            nb += 1
        else:
            is_finish = True
            break
    
    if is_finish:
        break

if nb < N:
    ans += sum(sA[nb:])

print(ans)
        
"""
    if nb >= N: # nbがN以上になれば、終了
        break
    
    B, C = sbcs[i]
    las = nb+B-1
    las = las if las <N else N-1
    if sA[nb] >= C: # もしnb個目がC以上であれば、終了
        break
    elif sA[nb+B-1] <= C: #もしB個目が、C以下なら、B個目までをCにする
        sA[nb:nb+B] = [C]*B
        nb += B
    else: #nb個目がC未満で、nb+B-1個目がCより大きければ
        t = binary_search(sA[nb:nb+B], C) 
        t = t if nb+t < N else N-nb-1
        sA[nb:nb+t+1] = [C]*(t+1)
        nb += t+1
    
print(sum(sA))
"""


# In[ ]:
X,Y =input().split()

if (Y % 2 == 0) and (4*X >= Y >=2*X):
    print('Yes')

else:
    print('No')

### FIXED CODE ###

X,Y =map(int,input().split())

if (Y % 2 == 0) and (4*X >= Y >=2*X):
    print('Yes')

else:
    print('No')
H,W = map(int,input().split())
s = [input() for i in range(H)]
ans = "No"
dx = [1,0,-1,0]
dy = [0,1,0,-1]
for i in range(0,H):
    for j in range(0,W):
        for k in range(4):
            nx = i+dx[k]
            ny = i+dy[k] 
            if s[i][j] == "#":
                if 0 <= nx < W and 0 <= ny < H:
                   if s[nx][ny] == "#":
                    ans = "Yes"

print(ans)

### FIXED CODE ###

H,W = map(int,input().split())
s = [input() for i in range(H)]
precount = 0
for i in range(H):
    precount += s[i].count("#")
if precount == 0:
    print("Yes")
else:
    ans = "Yes"
    dx = [1,0,-1,0]
    dy = [0,1,0,-1]
    for i in range(H):
        for j in range(W):
            if s[i][j] == "#":
               count = 0
               for k in range(4):
                   nx = j+dx[k]
                   ny = i+dy[k]
                   if 0 <= nx < W and 0 <= ny < H:
                      if s[ny][nx] == "#":
                         count += 1
               if count == 0:
                  ans = "No"

    print(ans)
N = int(input())
S = list(map(int, input().split()))
Q = int(input())
T = list(map(int, input().split()))

def binary_search(target_num, head, tail):
    idx = int(head+tail)
    if target_num == S[idx]:
        return True
    elif target_num < S[idx]:
        if head == idx:
            return False
        binary_search(target_num, head, idx-1)
    else target_num > S[idx]:
        if tail == idx:
            return False
        binary_search(target_num, idx+1, tail)


match_count = 0
for target_num in T:
    if binary_search(target_num, 0, len(T)-1):
        match_count += 1

print(str(match_count))


### FIXED CODE ###

def binary_search(S, n, index ):
    if S[index] == n:
        return 'eq'
    elif S[index] < n:
        return 'bt'
    elif S[index] > n:
        return 'lt'

n = int(input())
S = [int(i) for i in input().split()]
q = int(input())
T = [int(i) for i in input().split()]

cnt = 0
for i in T:
    mini = 0
    maxi = len(S) - 1
    while int(maxi - mini) >= 0:
        index = int( (mini + maxi) / 2 )
        rs = binary_search(S, i, index )
        if rs == 'eq':
            cnt += 1
            break
        elif rs == 'bt':
            mini = index + 1
        elif rs == 'lt':
            maxi = index - 1

print(cnt)