Problem:


Score : 200 points

Problem Statement

There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs.

Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.

Constraints

1 \leq X \leq 100

1 \leq Y \leq 100

All values in input are integers.

Input

Input is given from Standard Input in the following format:

X Y

Output

If there is a combination of numbers of cranes and turtles in which the statement is correct, print Yes; otherwise, print No.

Sample Input 1

3 8

Sample Output 1

Yes

The statement "there are 3 animals in total in the garden, and they have 8 legs in total" is correct if there are two cranes and one turtle. Thus, there is a combination of numbers of cranes and turtles in which the statement is correct.

Sample Input 2

2 100

Sample Output 2

No

There is no combination of numbers of cranes and turtles in which this statement is correct.

Sample Input 3

1 2

Sample Output 3

Yes

We also consider the case in which there are only cranes or only turtles.



Sample input:
3 8


Sample output:
Yes

Submission status: Accepted

Solution code:
X,Y=map(int, input().split())
flag=0

if Y>=4:
	for i in range(0,Y//4+1):
		if (X-i)*2+4*i==Y:
			flag=1
			break

else:
	if X==1 and Y==2:
		flag=1


print("Yes" if flag==1 else "No")

Submission status: Accepted

Solution code:
def solve() :
    x, y = map(int, input().split())

    flag = False
    for i in range(0, x+1) :
        if i*4 + (x-i)*2 == y :
            flag = True
            break

    if flag :
        print("Yes")
    else :
        print("No")


if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    x, y = map(int, input().split())
    ans = False
    for a in range(x + 1):
        b = x - a
        if 2 * a + 4 * b == y:
            ans = True
    
    if ans:
        print('Yes')
    else:
        print("No")

Submission status: Accepted

Solution code:
x,y = map(int, input().split())
flag = False
for i in range(x + 1):
    if 2*i + 4*(x - i) == y:
        flag = True
        break
if flag:print("Yes")
else:print("No")

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
for i in range(x+1):
  if i*2 + (x-i)*4 == y:
    print('Yes')
    exit()
print('No')

Submission status: Accepted

Solution code:
X,Y=map(int,input().split())
ans=False
for i in range(1,X+1):
    t=X-i
    if (2*i)+(4*t)==Y:
        ans=True
        break
    elif (2*t)+(4*i)==Y:
        ans=True
        break
    else:
        continue
print('Yes' if ans==True else 'No')

Submission status: Accepted

Solution code:
x, y = map(int, input().split())

for kame in range(x + 1):
    tsuru = x - kame
    ashi = tsuru * 2 + kame * 4
    if y == ashi:
        print('Yes')
        exit()
else:
    print('No')

Submission status: Accepted

Solution code:
a,b = list(map(int, input().split()))

for x in range(0, 101):
  for y in range(0, 101):
    if(x == 0 and y == 0):
      continue
    if(x + y == a and 2*x + 4*y == b):
      print("Yes")
      exit()
print("No")

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
f = False
for x in range(X + 1):
  y = X - x
  if x * 4 + y * 2 == Y:
    f = True
    break

print("Yes" if f else "No")

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())

for t in range(0,X+1):
    if t*2 + (X-t)*4 == Y:
        print('Yes')
        exit()

print('No')

Submission status: Accepted

Solution code:
[X,Y] = [int(s) for s in input().rstrip().split(' ')]
if Y % 2 == 0 and 2*X <= Y <= 4*X:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
x, y = map(int, input().split())

hantei = False
for i in range(x + 1):
    if i * 2 + (x - i) * 4 == y:
        print("Yes")
        hantei = True

if not hantei:
    print("No")

Submission status: Accepted

Solution code:
x,y = map(int, input().split())

for t in range(x+1):
    k = x-t
    if y==t*2+k*4:
        print("Yes")
        exit()
print("No")

Submission status: Accepted

Solution code:
X,Y=map(int,input().split() )
flag="No"

for i in range(X+1):
  if(4*i+2*(X-i)==Y):
    flag="Yes"

print(flag)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
find = False

for i in range(0, X + 1):
    if 2 * i + 4 * (X - i) == Y:
        find = True
        break

print("Yes" if find else "No")

Submission status: Accepted

Solution code:
x,y = map(int,input().split())

if 2*x <= y and y <= 4*x and y%2 == 0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
#import functools

def main():
    X, Y = tuple(int(c) for c in input().split(' '))
    for i in range(X+1):
        ashi = i*2 + (X-i)*4
        if ashi==Y:
            print('Yes')
            #print(i, X-i)
            break
    else:
        print('No')


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:

n,b = map(int, input().split())
flag = 0
for i in range(0,n+1):
    a = -2*i + 4*n - b
    if a == 0:
        print("Yes")
        flag = 1
        break
if flag != 1:
    print("No")

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
b = y/2 - x
a = x - b
if a >= 0 and b >= 0 and b == int(b):
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:

def resolve():
    X, Y = map(int, input().split())

    for i in range(X+1):
        turu = 2*i
        kame = 4*(X-i)
        tot = turu + kame
        if tot == Y:
            print("Yes")
            return
    else:
        print("No")

if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
ans = False
for c in range(x + 1):
    t = x - c
    if c + t == x and 2*c + 4*t == y:
        ans = True
        break
print('Yes' if ans else 'No')

Submission status: Accepted

Solution code:
import sys
x,y=map(int,input().split())
for i in range(x+1):
    asi=i*2+(x-i)*4
    if asi==y:
        print("Yes")
        sys.exit()
print("No")

Submission status: Accepted

Solution code:
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
INF = 1000000000000

x,y = LI()

flg = False
for i in range(x+1):
    val = 2 * i + 4 * (x-i)
    if(val == y):
        flg = True
        break

if(flg):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
def main():
    X, Y = map(int , input().split())

    yes = False

    for i in range(300):
        for j in range(300):
            if (i + j == X) and (2*i + 4*j == Y):
                yes = True

    if yes:
        print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
x, y = list(map(int, input().split()))

for i in range(x + 1):
    if 2*i + 4*(x - i) == y:
        print('Yes')
        break
else:
    print('No')

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
#x匹でy本
if y<2*x or 4*x<y or y%2==1:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())
flag = False
for i in range(X + 1):
    if 2 * (X - i) + 4 * i == Y:
        flag = True
        print('Yes')
if flag == False:
    print('No')

Submission status: Accepted

Solution code:
x,y=map(int,input().split())

#i:亀
#j:鶴
cnt=0
for i in range(x+1):
    j = x-i

    cnt = i*4 + j*2

    if cnt==y:
        print('Yes')
        exit(0)

print('No')

Submission status: Accepted

Solution code:
X,Y = (int(x) for x in input().split())
flag = 0
for i in range(X+1):
    if 2 * i + 4 * (X-i) == Y:
        flag = 1
        break
if flag == 0:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
def main():
  x, y = map(int, input().split())
  if (y-2*x)%2 == 0 and y-2*x >= 0 and (4*x-y)%2 == 0 and 4*x-y >= 0:
    print("Yes")
  else:
    print("No")
if __name__  == "__main__":
  main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    x, y = map(int, input().split())

    for i in range(x + 1):
        j = x - i
        if i * 2 + j * 4 == y:
            print("Yes")
            return
    print("No")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())

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

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    x,y = map(int,input().split())
    flag = 0
    for i in range(x + 1) :
        if i * 4 + (x - i) * 2 == y :
            print("Yes")
            flag = 1
            break 

    if flag == 0 :
        print("No")

Submission status: Accepted

Solution code:
x, y  = map(int, input().split())

if y % 2 == 1:
  print('No')
else:
  k = y // 2
  if k < x:
    print('No')
  else:
    b = k - x
    a = x - b
    if a < 0:
      print('No')
    else:
      print('Yes')

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
ans = 0
for xi in range(0, x+1):
  if xi*2 + (x-xi)*4 == y:
    ans = 1
    break
if ans == 1:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
X,Y=list(map(int,input().split()))

ans="No"

if (Y-2*X) % 2 == 0 and (4*X-Y) % 2 == 0 and (Y-2*X)>=0 and (4*X-Y)>=0:
    ans = "Yes"

print(ans)

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
z=y-2*x
if z%2!=0:
    print('No')
elif z//2<=x and z//2>=0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
x, y = input().strip().split()
x, y = [int(x), int(y)]
z=4*x-y
if z>=0 and z%2==0 and z/2<=x:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
from sys import stdin
input = stdin.readline

x, y  = map(int, input().split())

if ((y % 2 == 0) & (2 * x <= y ) & (4 * x >= y )):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
x,y = map(int, input().split())
n = (y - 2*x) / 2
m = x - n
if n >=0 and m >=0 and n==int(n) and m==int(m):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

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

for i in range(X+1):
    kame = i
    turu = X - kame
    if kame*4 + turu*2 == Y:
        print('Yes')
        exit()

print('No')

Submission status: Accepted

Solution code:
X, Y = list(map(int, input().split()))
if Y%2==0 and (X * 2 <= Y <= X * 4):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
x,y = list(map(int,input().split()))
 
for i in range(x+1):
    # print(i)
    if i*4 + (x-i)*2 == y:
        print("Yes")
        exit()
print("No")

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
for i in range(100):
	for j in range(100):
		if i+j==x and 2*i+4*j==y:
			print('Yes')
			exit()
print('No')

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
p = 2 * X - Y / 2
q = (-1) * X + Y / 2
tip = 0
ans = "No"
if p  != (p // 1):
  tip = 1
if q != (q // 1):
  tip = 1
if p < 0:
  tip = 1
if q < 0:
  tip = 1
if tip == 0:
  ans = "Yes"
print(ans)

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
ans=0
for i in range(y):
    for j in range(y):
        if i+j==x and 2*i+4*j==y:
            ans+=1
if ans>0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())

if Y % 2 == 1:
    print('No')
elif 4 * X < Y:
    print('No')
elif 2 * X > Y:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
ans = "No"
for i in range(x+1):
    if i*2+(x-i)*4==y:
        ans = "Yes"
print(ans)

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())

b = Y - 2*X
a = 4*X - Y
if a >= 0 and b >=0 and a %2 == 0 and b %2 == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
turu = 2*x
kame = 4*x
if y % 2 == 0:
    if y >= turu and y <= kame:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
## Library
 
import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter
import itertools
 
## input
 
# n=int(input())
# A,B,C,D=map(int, input().split())
# string = input()
# yoko = list(map(int, input().split()))
# tate = [int(input()) for _ in range(N)]
# N, M = map(int,input().split()) 
#    P = [list(map(int,input().split())) for i in range(M)]
 
X,Y=map(int, input().split())

if Y < 2*X:
    print("No")
    sys.exit()
if 4*X < Y:
    print("No")
    sys.exit()
if Y%2 == 1:
    print("No")
    sys.exit()

print("Yes")

Submission status: Accepted

Solution code:
x , y = map(int,input().split())
bool = False
for i in range(0, x+1):
    leg = 2 * i + 4 *(x -i)
    if leg == y :
        bool = True

if bool == True:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
if 2*a <= b <= 4*a and b%2==0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())

ans = 'No'
for i in range(X+1):
    crane_num = i
    turtle_num = X - i
    hoot_num = crane_num * 2 + turtle_num * 4
    if hoot_num == Y:
        ans = 'Yes'
print(ans)

Submission status: Accepted

Solution code:
X, Y = [int(i) for i in input().split()]

ans = "No"
for i in range(X + 1):
    if 2 * i + 4 * (X - i) == Y:
        ans = "Yes"
        break
print(ans)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split(" "))

kame = 0
turu = 0

if Y % 2 == 1:
  print("No")
elif Y < 2 * X or 4 * X < Y:
  # 上限を超えている
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
X, Y =map(int, input().split())
if (Y-2*X)%2 == 0 and 2*X-1 < Y < 4*X+1:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
x,y = map(int, input().split())

ans="No"
for i in range(0,x+1):
  if y==i*2+(x-i)*4:
    ans="Yes"
    break

print(ans)

Submission status: Accepted

Solution code:
a = list(map(int, input().split()))
if a[1] % 2 == 0 and a[1] // 2 >= a[0] and a[1] // 2 <= 2 * a[0]:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())

a = 4*X-Y
b = (4-2)
tmp = a//b
if a%b == 0 and tmp >=0 and (X-tmp)>=0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
[X,Y]=list(map(int, input().split()))
flg=True
for i in range(X+1):
    j=X-i
    if 2*i+4*j==Y:
        print('Yes')
        flg=False
if flg:
    print('No')

Submission status: Accepted

Solution code:
x, y = map(int, input().split())

a = 2 * x
if a > y:
    print('No')
elif y % 2 == 1:
    print('No')
else:
    if (y-a)//2 > x:
        print('No')
    else:
        print('Yes')

Submission status: Accepted

Solution code:
#from collections import deque,defaultdict
from sys import stdin
input = stdin.readline
printn = lambda x: print(x,end='')
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
ins = lambda : input().strip()
DBG = True # and False
BIG = 10**18
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

x,y = inm()
if y%2==0 and 2*x<=y<=4*x:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
total, legs = [int(i) for i in input().split()]

turtles = legs // 2 - total
cranes = total - turtles

# print(turtles, cranes)

res = turtles >= 0 and cranes >= 0 and turtles * 4 + cranes *2 == legs and turtles + cranes == total

print("Yes" if res else "No")

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
if X*2 <= Y and X*4 >= Y and Y % 2 == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
x, y = map(int, input().split())

for i in range(x+1):
  l = (2 * i) + (4 * (x - i))
  if l == y:
    print('Yes')
    exit(0)
print('No')

Submission status: Accepted

Solution code:
import sys

X, Y = map(int, sys.stdin.readline().strip().split())

ans = 'No'
for crane in range(X + 1):
    turtle = X - crane

    if Y == crane * 2 + turtle * 4:
        ans = 'Yes'
        break

print(ans)

Submission status: Accepted

Solution code:
x,y=map(int, input().split())
for i in range(x+1):
    for j in range(x+1):
        if i+j==x and 2*i+4*j==y:
            print("Yes")
            exit()
print("No")

Submission status: Accepted

Solution code:
from sys import exit
x, y = map(int, input().split())
for a in range(0, 101):
    for b in range(0, 101):
        if a + b == x and 2 * a + 4 * b == y:
            print("Yes")
            exit()
else:
    print("No")

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())

if Y % 2 == 1:
    print('No')
elif Y >= 2*X and Y <= 4*X:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
(X,Y) = map(int,input().split())
for i in range(X+1):
    if (i*2)+(X-i)*4 == Y:
        print('Yes')
        break
else:
    print('No')

Submission status: Accepted

Solution code:
A,B=list(map(int,input().split()))
for i in range(A+1):
   j=A-i
   if i*2+j*4==B:
      print("Yes")
      exit()
print("No")

Submission status: Accepted

Solution code:
x,y = list(map(int, input().split()))
if(y%2==1):
  print("No")
elif(y//2 - x < 0):
  print("No")
elif(2*x - y//2 < 0):
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print('Yes' if sum(2 * i + 4 * (a - i) == b for i in range(a + 1)) else 'No')

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
flag=False
for i in range(x):
    c=2*i+4*(x-i)
    C=4*i+2*(x-i)
    if c==y or C==y:
        flag=True
if flag:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
for i in range(0, X+1):
  num = i*2 + (X-i)*4
  if num == Y:
    print("Yes")
    exit(0)
print("No")

Submission status: Accepted

Solution code:
x, y = map(int, input().split())

tori = 2
kame = 4 # 全部
legs = 4*x
while True:
    if legs == y:
        print("Yes")
        exit()
    legs -= 2
    if legs < 2*x: # 全部鳥
        print("No")
        exit()

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
ans = 'No'
for N_tsuru in range(X+1):
    N_kame = X - N_tsuru
    if N_tsuru*2 + N_kame*4 == Y:
        ans = 'Yes'

print(ans)

Submission status: Accepted

Solution code:
num = list(map(int, input().split()))

for i in range(num[0] + 1):
    leg = i * 2 + (num[0] - i) * 4
    if(num[1] == leg):
        print('Yes')
        break
else:
    print('No')

Submission status: Accepted

Solution code:
import sys

x, y = map(int, input().split())

for i in range(0, x + 1):
    j = x - i
    if y == i * 2 + j * 4:
        print("Yes")
        sys.exit(0)
print("No")

Submission status: Accepted

Solution code:
x,y = map(int,input().split())

if y%2 == 0 and x*2 <= y <= x*4:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())

b = (Y-2*X)/2
a = X - b

if a < 0 or b < 0 or b%1 != 0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
flg = 0
for _ in range(x+1):
  if (x - _) * 2 + _ * 4 == y:
    flg = 1
    break

if flg:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
if y%2 == 0 and y <= 4*x and y >= 2*x:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
x,y = map(int,input().split())

min_ans = 2*x
max_ans = 4*x

if (min_ans<=y) and (max_ans>=y):
    if y%2 == 0:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

nums = [2 * X + 2 * t for t in range(X + 1)]
answer = 'Yes' if Y in nums else 'No'
print(answer)

Submission status: Accepted

Solution code:
n = input().split()
X = int(n[0])
Y = int(n[1])
flag = 0

for i in range(X+1):
    ashi = 2*i + 4*(X-i)
    if ashi == Y:
        print("Yes")
        flag = 1
if flag == 0:
    print("No")

Submission status: Accepted

Solution code:
x,y = map(int,input().split())

if y%2==1:
  print("No")
else:
  if x <= y/2 and 2*x >= y/2:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
ans = False
for i in range(0,X+1):
    j = X-i
    if (i)*2+(j)*4 == Y:
        ans = True
if ans:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
for i in range(x+1):
    if i*2 + (x-i)*4 == y:
        print('Yes')
        break
else:
    print('No')

Submission status: Accepted

Solution code:
x,y=(int(x) for x in input().split())

ma=x*4-y
if ma>=0:
    if ma%2==0:
        if ma/2>=0 and ma/2<=x:
            print('Yes')
        else:
            print('No')
    else:
        print('No')
else:
    print('No')

Submission status: Accepted

Solution code:
x,y = map(int,input().split())

for i in range(x+1):
    for j in range(x+1):
        if i+j != x:
            continue
        if 2*i+4*j == y:
            print("Yes")
            exit()
print("No")

Submission status: Accepted

Solution code:
X, Y= list(map(int, input().split()))
if Y % 2 == 0 and 2*X - 1 < Y and 4*X + 1> Y :
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
X,Y=list(map(int,input().split()))
for i in range(0,X+1):
    if 2*i+4*(X-i)==Y:
        print('Yes')
        exit()
print('No')

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
c=0
for i in range(x+1):
    if 2*i+4*(x-i)==y:
        print('Yes')
        c=1
        break
if c==0:
    print('No')

Submission status: Accepted

Solution code:
def B():
    x,y = list(map(int, input().split()))
    for i in range(x+1):
        if 4*x-2*i == y:
            print("Yes")
            return
    print("No")
B()

Submission status: Accepted

Solution code:
date=input().rstrip().split(" ")
X=int(date[0])
Y=int(date[1])
if Y%2==1:
    print("No")
elif 2*X<=Y<=4*X:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
x,y = map(int, input().split())
if x*2 <= y <= x*4 and y%2 == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
import sys
from io import StringIO
import unittest
import os

# 再帰処理上限(dfs作成時に設定するのが面倒なので限度近い値を組み込む)
sys.setrecursionlimit(999999999)


# 実装を行う関数
def resolve():
    # 数値取得サンプル
    #   1行N項目 x, y = map(int, input().split())
    #   N行N項目 x = [list(map(int, input().split())) for i in range(n)]

    # 文字取得サンプル
    #   1行1項目 x = input()

    x, y = map(int, input().split())

    leg = 2 * x

    if leg == y:
        print("Yes")
        return

    for i in range(x):
        leg += 2
        if leg == y:
            print("Yes")
            return

    print("No")


# テストクラス
class TestClass(unittest.TestCase):
    def assertIO(self, assert_input, output):
        stdout, sat_in = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(assert_input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, sat_in
        self.assertEqual(out, output)

    def test_input_1(self):
        test_input = """3 8"""
        output = """Yes"""
        self.assertIO(test_input, output)

    def test_input_2(self):
        test_input = """2 100"""
        output = """No"""
        self.assertIO(test_input, output)

    def test_input_3(self):
        test_input = """1 2"""
        output = """Yes"""
        self.assertIO(test_input, output)

    # 自作テストパターンのひな形(利用時は「tes_t」のアンダーバーを削除すること
    def test_1original_1(self):
        test_input = """5 20"""
        output = """Yes"""
        self.assertIO(test_input, output)

    def test_1original_2(self):
        test_input = """5 10"""
        output = """Yes"""
        self.assertIO(test_input, output)


# 実装orテストの呼び出し
if __name__ == "__main__":
    if os.environ.get("USERNAME") is None:
        # AtCoder提出時の場合
        resolve()

    else:
        # 自PCの場合
        unittest.main()

Submission status: Accepted

Solution code:
x,y=map(int, input().split())
if y>=2*x and 4*x>=y:
  if (y-2*x)%2==0 and (4*x-y)%2==0:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline

x, y = map(int, readline().split())
ans = "Yes" if y % 2 == 0 and x*2 <= y <= x*4 else "No"
print(ans)

Submission status: Accepted

Solution code:
x,y = map(int,input().split())

for i in range(x+1):
  for j in range(x+1):
    if 2*i + 4*j == y and i+j == x:
      print("Yes")
      exit(0)
print("No")

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())

max_legs = 4 * X

if max_legs < Y:
    print("No")
    exit()

legs = max_legs

for i in range(X+1):
    legs = i * 2 + (X-i) * 4
    if legs == Y:
        print("Yes")
        exit()
print("No")

Submission status: Accepted

Solution code:

import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

x, y = na()
for t in range(100):
    for k in range(100):
        if x == (t + k) and y == 2*t + 4*k:
            print("Yes")
            quit()
print("No")

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
if (y - 2 * x) % 2 == 0 and y - 2 * x >= 0:
    b = (y - 2 * x) // 2
else:
    print('No')
    exit()
if x - b >= 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
import collections
input = sys.stdin.readline

a,b= map(int,input().split())
if b %2 ==0 :
    B=b//2
    if a<=B and B<=2*a:
        print('Yes')
        sys.exit()
    else:
        print('No')
        sys.exit()
else:
    print("No")
    sys.exit()

Submission status: Accepted

Solution code:
#B
X,Y = map(int, input().split())
hantei = False
for i in range(X+1):
    if 2*i+4*(X-i)==Y:
        hantei = True
        break
print("Yes" if hantei else "No")

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
ans = "No"
for t_num in range(x+1):
    k_num = x - t_num
    if t_num * 2 + k_num * 4 == y:
        ans = "Yes"
        break
print(ans)

Submission status: Accepted

Solution code:
x, y = map(int, input().split())

if y % 2 == 1:
    print('No')
else:
    if (y > 4*x) or (y < 2*x):
        print('No')
    else:
        print('Yes')

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
result = 'No'
for i in range(x+1):
    t = x-i
    k = x-t
    if y == t*2 + k*4:
        result = 'Yes'
        break
print(result)

Submission status: Accepted

Solution code:
import numpy as np
import math
import collections


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

if (4 * X - Y) % 2 == 0 and 4 * X >= Y and 2 * X <= Y:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
S, Y = (map(int, input().split()))
if((4*S-Y)%2 == 0 and (Y-2*S)%2 == 0 and 4*S >= Y and Y >= 2*S):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
def main():
    x,y = map(int,input().split())
    ans = 0
    for i in range(100):
        for j in range(100):
            if i * 2 + j * 4 == y and i + j == x:
                ans = 1
    if ans == 1:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
X,Y = list(map(int, input().split()))
_max = X*4
_min = X*2

if Y<= _max and Y>= _min and Y%2==0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys

#S = input()
#N = int(input())
#n = [list(map(int,input().split())) for i in range(N)]
#n, y = map(int, input().split())

x, y = list(map(int,input().split())) 
#print(x, y)

for i in range(x+1):
    if((i ) * 2 + (x -i) * 4 == y):
        print("Yes")
        sys.exit(0)
print("No")

Submission status: Accepted

Solution code:
import sys

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

for i in range(X+1):
    if 2*i + 4*(X-i) == Y:
        print("Yes")
        sys.exit()
    else:
        pass

print("No")

Submission status: Accepted

Solution code:
x, y = map(int, input().split())

for a in range(0, x+1):
    for b in range(0, x+1-a):
        if a + b == x:
            if a*2 + b*4 == y:
                print('Yes')
                exit()

print('No')

Submission status: Accepted

Solution code:
#!python3

LI = lambda: list(map(int, input().split()))

# input
X, Y = LI()


def main():
    ans = "No"
    for a in range(X + 1):
        b = X - a
        if 2 * a + 4 * b == Y:
            ans = "Yes"
            break
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(X: int, Y: int):
    b = (Y - 2 * X) / 2
    a = X - b


    if b % 1 == 0 and a % 1 == 0 and a >=0 and b>=0:
        print(YES)
    else:
        print(NO)
    return


# Generated by 1.1.7.1 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()
    X = int(next(tokens))  # type: int
    Y = int(next(tokens))  # type: int
    solve(X, Y)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
flag = False
su = 2*x
if su == y:
    flag = True
for i in range(x):
    su += 2
    if su == y:
        flag = True
        break
if flag:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
x,y=map(int,input().split())

for i in range(101):
    for j in range(101):
        if 2*i+4*j==y:
            if i+j==x:
                print("Yes")
                exit()
print("No")

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())

Ymin = 2*X
Ymax = 4*X

if Ymin <= Y <= Ymax and Y%2==0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys
x, y = map(int, input().split())
for i in range(x+1):
    if i*2 + (x-i)*4 == y:
        print("Yes")
        sys.exit()
print("No")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

X,Y = map(int, input().split())
ans = []
for i in range(2*X, 4*X+1):
    if i % 2 == 0:
        ans.append(i)
#print(ans)
if Y in ans:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
if (x * 2 <= y <= x * 4) and y % 2 == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
x,y=map(int,input().split(" "))

if y%2==0:
  if y>=2*x and y<=4*x:
    print("Yes")
  else:
    print("No")
else:
    print("No")

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
if y<2 * x :
    print("No")
elif 4 * x < y:
    print("No")
elif y % 2 == 1:
    print("No")
else:
    print("Yes")