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 =[int(x) for x in input().split()]

t = (y - 2*x)

if t >=0 and t%2 == 0 and x - t//2 >=0 :
    print('Yes')
else:
    print('No')

# y = 4*t + 2*(x - t)
# y = 2*t + 2 *x
# t = (y - 2*x)//2
# t >= 0 and t integer

# x = t + c

# y = 4*t + 2*(x - t)
# y = 2*t + 2*x
# 2*t = y - 2*x

# and c = x - t

Submission status: Accepted

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

c=0

for x in range(X+1):
  for y in range(Y+1):
    if X==x+y and Y==2*x+4*y:
      print('Yes')
      c=1
      break
      
if c==0:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

flag=False

for a in range(0,101):
    b=X-a
    if ((2*a + 4*b==Y) and (b>=0)):
        flag=True
        break

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	B
# CreatedDate:  2020-06-14 21:02:42 +0900
# LastModified: 2020-06-14 21:11:18 +0900
#


import os
import sys
#import numpy as np
#import pandas as pd
from numpy.linalg import solve

def main():
    x,y=map(int,input().split())
    left=[[1,1],[2,4]]
    right=[x,y]
    a=solve(left,right)
    if a[0].is_integer() and a[1].is_integer() and a[0]>=0 and a[1]>=0:
        print("Yes")
    else:
        print("No")



if __name__ == "__main__":
    main()

Submission status: Accepted

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

x,y = map(int, input().split())
leg2 = 0 
leg4 = x
flg =  0
while(leg4!=-1):
    if leg2*2 + leg4*4 == y:
        flg = 1
        break
    else:
        leg2 += 1
        leg4 -= 1
    #print(i,leg2*2 + leg4*4)

if flg == 1:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

a = (y-2*x) 

if(a >= 0):
    if(a%2==0):
        if((x-a//2)>=0):
            print('Yes')
        else:
            print('No')
    else:
        print('No')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# = int(input())
X, Y = map(int, input().split())
# = list(map(int, input().split()))
# = [int(input()) for i in range(N)]
# = [list(map(int, input().split())) for i in range(N)]

if 4*X - Y < 0 or Y - 2*X < 0:
    print("No")
    exit()

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

    else:
        print("No")

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
cnt = 0
for a in range(101):
  for b in range(101):
    if y == 2*a + 4*b and x == a+b:
      cnt += 1
      print('Yes')
      break
if cnt == 0:
  print('No')

Submission status: Accepted

Solution code:
X,Y = list(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())

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

if Y%2!=0:
    print("No")

elif 2*X-Y/2 >=0 and Y/2-X>=0:
    print("Yes")

else:
    print("No")

Submission status: Accepted

Solution code:
import itertools

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

answer = 'No'
for i in range(X + 1):
    j = X - i
    
    if i*4 + j*2 == Y:
        answer = 'Yes'
        break

print(answer)

Submission status: Accepted

Solution code:
x,y = (int(x) for x in input().split())
if y%2 != 0:
  print("No")
elif -2*x + y < 0 or 4*x-y < 0:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

ttt = 0
for i in range(x+1):
    leg = 2 * i + 4 * (x - i)
    if leg == y:
        ttt = leg
        print("Yes")

if ttt != y:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

if(2*input_line[0]>input_line[1]):
    print('No')
elif(4*input_line[0]<input_line[1]):
    print('No')
elif(input_line[1]%2!=0):
    print('No')
else:
    leg = input_line[0]*2
    for i in range(input_line[0]+1):
        if(leg+i*2):
            print('Yes')
            break
    else:
        print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in range(x+1):
    if 2*i+4*(x-i) == y:
        f = True

if f:
    print('Yes')

else:
    print('No')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
X, Y = map(int, input().split())

turtle_num = (Y - 2 * X) / 2
crain_num = X - turtle_num
ans = turtle_num * 4 + crain_num * 2
if turtle_num % 1 == 0 and crain_num % 1 == 0 and turtle_num >= 0 and crain_num >= 0:
    print("Yes")
#     print("Yes", turtle_num, crain_num)
else:
    print("No")

Submission status: Accepted

Solution code:
# Contest No.: ABC170
# Problem No.: B
# Solver:      JEMINI
# Date:        20200614

import sys
import heapq

def main():
    a, b = map(int, input().split())
    n, m = 0, 0
    
    n = (4 * a - b)
    m = (b - 2 * a)

    if n < 0 or m < 0 or n % 2 or m % 2:
        print("No")
    else:
        print("Yes")
    
    return

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
X, Y = map(int, input().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())
a="No"
for i in range(x+1):
    if y==x*4-i*2:
        a="Yes"
        break
print(a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def main():
    X,Y = map(int, input().split())
    for i in range(0,X+1):
        if (i*2 + (X-i)*4) == Y:
            print("Yes")
            break
    else:
        print("No")

if __name__ == '__main__':
    main()

Submission status: Accepted

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

K = (Y-2*X)/2

if K >= 0 and K <= X and K.is_integer():
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
#: Author - Soumya Saurav
import sys,io,os,time
from collections import defaultdict
from collections import OrderedDict
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect,math,heapq
alphabet = "abcdefghijklmnopqrstuvwxyz"

input = sys.stdin.readline

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



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

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

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
if 4*x-y>=0 and (4*x-y)%2==0 and 2*x<=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:
import io,sys
sys.setrecursionlimit(10**6)


def main():
    X,Y = map(int,sys.stdin.readline().rstrip().split())

    y = (Y-2*X)/2
    x = X-y

    if y>=0 and y == int(y) and x >= 0:
        print("Yes")
    else:
        print("No")
main()

Submission status: Accepted

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

flag=False
for i in range(0,101):
    for j in range(0,101):
        if i+j==x and i*2+j*4==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 Y == 4*X - 2*i:
    print("Yes")
    exit()
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:
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from itertools import (
    accumulate, combinations, combinations_with_replacement, groupby,
    permutations, product)
from math import (acos, asin, atan, ceil, cos, degrees, factorial, gcd, hypot,
                  log2, pi, radians, sin, sqrt, tan)
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits


def inp():
    return(int(input()))


def inlist():
    return(list(map(int, input().split())))


def instr():
    s = input()
    return(list(s[:len(s)]))


def invr():
    return(map(int, input().split()))


a, b = invr()
res = "No"
for i in range(a+1):

    if i*2 + (a-i)*4 == b:
        res = "Yes"
        break
print(res)

Submission status: Accepted

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

for i in range(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())
cranex2 = 4 * X - Y
turtlex2 = Y - 2 * X
print('Yes' if cranex2 % 2 == 0 and cranex2 >= 0 and turtlex2 % 2 == 0 and turtlex2 >= 0 else 'No')

Submission status: Accepted

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

ans='No'
for a in range(50+1):
    for b in range(25+1):
        x=a+b
        y=2*a+4*b
        
        if x==X and y==Y:
            ans='Yes'

print(ans)

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] = list(map(int, input().split(" ")))
_flag = False
for _i in range(_x + 1):
  if _i * 2 + (_x - _i) * 4 == _y:
    _flag = True

if _flag == True:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main1():
    A,B=map(int,input().split())
    for x in range(0,401):
        for y in range(0,401):
            if x+y==A and 2*x+4*y==B:
                print("Yes")
                return 
    print("No")
     
main1()

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
b = 0
for i in range(a[0]+1):
  n = 2*i+4*(a[0]-i)
  if n == a[1]:
    b = b+1
    print("Yes")
if b==0:
  print("No")

Submission status: Accepted

Solution code:
# B - Crane and Turtle

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

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

print(ans)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
flag = False
for x in range(X+1):
    kame = x
    turu = X - x

    if 4 * kame + 2 * turu == Y:
        flag = True

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

Submission status: Accepted

Solution code:
import sys
import os
import itertools
from collections import deque

def main():
    if os.getenv("ENV")=='LOCAL':
        sys.stdin = open(os.path.dirname(__file__)+'/input.txt', 'r')

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

    x=Y/2-X
    y=2*X-Y/2

    if x>=0 and y>=0 and x.is_integer() and y.is_integer():
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
line = input().split()
line=[int(i) for i in line]

turu=line[0]*2
kame=line[0]*4

if line[1]%2==0 and line[1]>=turu and line[1]<=kame:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
import sys



if(__name__ == "__main__"):

    XY = input().strip().split()
    N_Animals = int(XY[0])
    N_Legs = int(XY[1])

    N_Turtles = (N_Legs - 2 * N_Animals) / 2
    N_Cranes = N_Animals - N_Turtles
    if(N_Turtles >= 0 and N_Cranes >= 0 and N_Turtles == int(N_Turtles) ):
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

ans = 'No'

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main(x, y):
    if y in (x * 2, x * 4):
        print("Yes")
        return

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

    print("No")


if __name__ == "__main__":
    x, y = map(int, input().split())

    main(x, y)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
animals, legs = input().split()
animals = int(animals)
legs = int(legs)

for i in range(0,animals+1):
  if ((i * 2) + ((animals - i) * 4)) == legs:
    result = True
    break
  result = False

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
a = 2 * x - (y / 2)
b = (y / 2) - x

if a.is_integer() and b.is_integer() and ((a >=1 and b >=0) or (a>=0 and b >= 1)):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

for a in range(x + 1):
    if 2 * a + 4 * (x - a) == y:
        answer = "Yes"
        break
    else:
        answer ="No"

print(answer)

Submission status: Accepted

Solution code:
# B
import sys
x, y = map(int, input().split())
for i in range(x + 1):  # 鶴
    for j in range(x + 1):  # 亀
        if i + j == x and (i * 2 + j * 4) == y:
            print('Yes')
            sys.exit()
print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
data = [int(i) for i in input().split()]
x = data[0]
y = data[1]


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

print(ans)

Submission status: Accepted

Solution code:
import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

exist_flag = False

for i in range(x + 1):
  total = 2 * i + 4 * (x - i)
  if total == y:
    exist_flag = True
    break

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

Submission status: Accepted

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

b = (y - 2*x)/2
if (y - 2*x)%2 == 0 and b <= x and b >= 0:
  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(' '))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def calc(X, Y):
    if Y % 2 == 1:
        return 'No'
    elif Y >= 2 * X and Y <= 4 * X:
        return 'Yes'
    else:
        return 'No'

    

(X, Y) = tuple([int(s) for s in input().split()])
print(calc(X, Y))

Submission status: Accepted

Solution code:
XY = [int(x) for x in input().split()]

n=0
for i in range(XY[0]+1):
  if i*2+(XY[0]-i)*4==XY[1]:
    n=1

if n==0:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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


A = 2 * X - (Y / 2)

if A.is_integer() and (A >= 0) and (X - A) >= 0:
    print('Yes')

else:
    print('No')

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
x, y = map(int, input().split())
for i in range(0, x+1):
  if i*4+(x-i)*2==y:
    print('Yes')
    sys.exit()
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:
def main():
    X,Y = [int(x) for x in input().split()]
    tsuru = 2
    kame = 4
    for i in range(X+1):
        if Y == (X-i)*kame + i*tsuru:
            print('Yes')
            return
    print('No')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def s(a):
	res = 0
	for v in a:
		res += v
	return res

x, y =map(int, input().split())
a = [2]*x

for i in range(x):
	if s(a) == y:
		print("Yes")
		exit()
	a[i] = 4
if s(a) == y:
	print("Yes")
	exit()

print("No")

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
X,Y = map(int, input().split())

i=0
while i<=X:
    KAME=X-i
    TURU=i
    if (KAME*4)+(TURU*2)==Y:
        print("Yes")
        quit()
    i+=1
    
print("No")

Submission status: Accepted

Solution code:
k = list(map(int, input().split()))
if k[0] * 2 > k[1] or k[0] * 4 < k[1] or k[1] % 2 != 0:
  print("No")
else:
  a = []
  for i in range(k[0] + 1):
    a.append((i, k[0] - i))
  
  for i in a:
    re = i[0] * 2 + i[1] * 4
    if re == k[1]:
      print("Yes")
      break

Submission status: Accepted

Solution code:
#!python3.8
# -*- coding: utf-8 -*-
# abc170/abc170_b
import sys

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    X, Y = i2nn()
    if Y % 2 == 0 and 2 * X <= Y <= 4 * X:
        print('Yes')
    else:
        print('No')
    return

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    x, y = map(int, input().split())
    for t in range(y//4+1):
        for k in range(y//2+1):
            if t*4 + k*2 == y and t+k == x:
                print("Yes")
                return
    print("No")

resolve()

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())
tsuru = 0
kame = 0
ans = 'No'

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

def calculate(x,y):
    a = (4 * x - y) / 2
    b = x - a
    if a < 0:
        print("No")
        return
    if b < 0:
        print("No")
        return

    if float.is_integer(a) and float.is_integer(b):
        print("Yes")
    else:
        print("No")

calculate(X,Y)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x, y = [int(i) for i in input().split()]
i = 0
ans = "No"
while i <= x:
    if 2 * (x + i) == y:
        ans = "Yes"
        break
    else:
        i += 1

print(ans)

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
flag = 0
for i in range(0,x+1):
    #鶴だけ固定
    now = y - 2 * i
    #亀の足の数 = y - 2×鶴の足の数
    if now % 4 == 0:
        #足の数が4で割り切れたら
        if now //4 == (x - i):
            #足の数の商が (x - i)と一致したら
            print("Yes")
            flag += 1
            break
if flag == 0:
    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 = map(int, input().split())

tsuru = ((Y - 2 * X) / 2)
kame = ((4 * X - Y) / 2)

if tsuru >= 0 and tsuru.is_integer() and kame >= 0 and kame.is_integer():
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
X , Y = map(int, input().split())
val = X * 2 - 2
for i in range(X + 1):
    val += 2
    if val == Y:
        print('Yes')
        break
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):
    #print(i,j)
    if i*2 + j*4 == y and i+j == x:
      print("Yes")
      exit()
print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input().split()

x = int(s[0])
y = int(s[1])

answer = "No"

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

print(answer)

Submission status: Accepted

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

def main():
    X,Y = map(int, input().split())
    for i in range(X+1):
        j = X-i
        if 2*i+4*j==Y:
            ans='Yes'
            break
    else:
        ans='No'
    print(ans)
    
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
x =a[0]
y =a[1]
z = y-x*2
w = x*4
if z<0 or z%2==1 or y>w:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

tei=x*2
kou=x*4

if y%2==0 and tei<=y and kou>=y:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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


def judge(a,b):
    if a < 0 or b < 0:
        return "No"
    elif not a.is_integer():
        return "No" 
    elif not b.is_integer():
        return "No" 
    else:
        return "Yes"

print(judge(a,b))

Submission status: Accepted

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

if 4 * X < Y or 2 * X > Y:
  print("No")
elif Y % 2 != 0:
  print("No")
else:
  print("Yes")

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())
for i in range(x+1):
  j = x - i
  if i * 2 + j * 4 == y:
    print("Yes")
    break
else:
  print("No")

Submission status: Accepted

Solution code:
import numpy as np
X, Y = list(map(int, input().split()))
k = np.floor((Y / 2.0) - X)
t = np.floor(2*X - (Y / 2.0))
if k + t == X and k >= 0 and t >= 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

x = 2*X - Y/2.0
y = -1*X + Y/2.0

if x.is_integer() and y.is_integer() and x >= 0 and y >= 0:
    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 = list(map(int, input().split()))
if Y % 2 == 0 and 2*X <= Y and Y <= 4*X:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
a = int(2*x - 0.5*y)
b = int(-x + 0.5*y)

if y % 2 == 1:
    print('No')
    exit()

if a < 0 or b < 0:
    print('No')
    exit()

print('Yes')

Submission status: Accepted

Solution code:
nums=[int(s) for s in input().split()]

x=nums[0]
y=nums[1]


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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
X,Y=map(int, input().split())
ok = 0
for i in range(101):
  for j in range(101):
    if (i+j == X) and ((i*2)+(4*j)==Y):
      ok = 1
      break
  if ok == 1:
    break
if ok == 1:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]


def main():
    X, Y = map(int,input().split())
    a = Y - 2 * X
    if a >= 0 and a % 2 == 0 and a / 2 <= X:
        print('Yes')
    else:
        print('No')

    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

k = Y-2*X
t = 4*X-Y

if Y%2==0 and k>=0 and t>=0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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