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.

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


mn = X * 2
mx = X * 4
if Y % 2 == 0 and mn <= Y <= mx:
    print('Yes')
else:
    print('No')

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10**8)
input = sys.stdin.readline

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

flag = False
for i in range(101):
    for j in range(101):
        if i+j==X and 2*i+4*j==Y:
            flag = True
            break
    else:
        continue
    break

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

Solution (Python):
import sys
input = sys.stdin.readline
from collections import *

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

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

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

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

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

Solution (Python):
import sys
input=lambda: sys.stdin.readline().rstrip()
x,y=map(int,input().split())
for i in range(x+1):
  if 2*i+4*(x-i)==y:
    print("Yes")
    break
else:
  print("No")

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

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

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

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



low = x*2
up = x*4

if low <= y <= up and y%2 == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
from sys import stdin
from sys import setrecursionlimit
setrecursionlimit(10 ** 7)

x,y = map(int,stdin.readline().rstrip().split())

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

print("No")

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

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

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

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

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

for i in range(100):
    for j in range(100):
        if i*4+j*2==Y and i+j==X:
            print('Yes')
            exit()
print('No')

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

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

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

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

Solution (Python):
X, Y = [int(hoge) for hoge in input().split()]
for t in range(X+1):
    asi = t*2 + (X-t) * 4
    if asi == Y:
        print("Yes")
        exit()
print("No")

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

for kame in range(100):
   for turu in range(100):
      if kame + turu == x and kame * 4 + turu * 2 == y:
         print("Yes")
         exit()
print("No")

Solution (Python):


import sys
sys.setrecursionlimit(300000)

YES = "Yes"  
NO = "No"  

def solve(X: int, Y: int):
    ret = NO
    for i in range(X + 1):
        if 4 * i + 2 * (X - i) == Y:
            ret = YES
    print(ret)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  
    Y = int(next(tokens))  
    solve(X, Y)

if __name__ == '__main__':
    main()

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

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

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

    for crane in range(X + 1):
        turtle = X - crane
        if Y == crane * 2 + turtle * 4:
            print('Yes')
            return

    print('No')


if __name__ == '__main__':
    main()

Solution (Python):
from sys import stdin
from sys import setrecursionlimit
from collections import Counter, deque, defaultdict
from math import floor, ceil
from bisect import bisect_left
from itertools import combinations
setrecursionlimit(100000)

INF = int(1e10)
MOD = int(1e9 + 7)

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

    for tsuru in range(0, x + 1):
        kame = x - tsuru
        if 2 * tsuru + 4 * kame == y:
            print("Yes")
            exit()
    print("No")

if __name__ == '__main__':
    main()

Solution (Python):



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

Solution (Python):
def main():
    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")


if __name__ == '__main__':
    main()

Solution (Python):
X,Y=map(int, input().split())
print("YNeos"[not any(i*2+(X-i)*4==Y for i in range(X+1))::2])

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

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

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

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

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

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

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

print('No')

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

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

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

print("No")

Solution (Python):
import bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import random
import re
import string
import sys
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from functools import lru_cache, reduce
from math import gcd
from operator import add, itemgetter, mul, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

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


x, y = list(map(int, sys.stdin.buffer.readline().split()))

ok=False
for i in range(200):
    for j in range(200):
        if i + j == x and         i * 2 + j * 4 == y:
            ok=True
if ok:
    print('Yes')
else:
    print('No')

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin, log, log10, gcd
from itertools import permutations, combinations, product, accumulate, combinations_with_replacement
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

from decimal import *
def debug(*args):
    if debugmode:
        print(*args)
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def FLOAT(): return float(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7
dx = [0, 1, 0, -1, 1, -1, -1, 1]
dy = [1, 0, -1, 0, 1, -1, 1, -1]
debugmode = True

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

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

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

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

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

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

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

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

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