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: Wrong Answer

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

for i in range(b):
  for y in range(b-i):
    if i*2 + y*4 ==t:
      a=1
    else:
      a=0
if a == 1:
  print("Yes")
elif a == 0:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if  y/x >4:
    print('No')
elif y%x == 4 or y%x == 2:
    print('Yes')
else:
    print('Yes')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
for T in range(100):
  for K in range(100):
    if (T+K) == X and (2*T) + (4*K) == Y:
      print("YES")
      exit()
print("NO")

Submission status: Wrong Answer

Solution code:
a = input().split(" ")
i = 0
f = 0
l = int(a[0])
s = int(a[1])
if (l * 4 < s) or (s % 2 == 1) :
    f = f + 1
    print("N0")
while (i < l) and (f == 0) and (l > 0):
    if (s - 4 >= 0) :
        l = l - 1
        s = s - 4
    if (s - 2 >= 0) and (s - 4 <= 0) :
        l = l - 1
        s = s - 2
    i = i + 1
if s == 0 :
    print("YES")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!

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

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

Submission status: Wrong Answer

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    x, y = map(int, input().split())
    for i in range(0, x + 1):
        if y == ((2 * i) + (4 * (x - i))):
            print('yes')
            exit()
    print('No')

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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


main()

Submission status: Wrong Answer

Solution code:
import sys

x, y = map(int, input().split())
x *= 2
y -= x
if(y == 0):
  print('Yes')
  sys.exit()

for i in range(x - 1):
  y -= 2
  if(y == 0):
    print('Yes')
    sys.exit()

print('No')

Submission status: Wrong Answer

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

z=y-(2*x) 
a=z/2 

if a<=x:
    print('yes')
else:
    print('no')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x,y= map(int, input().split())
if y %2 == 0:
    if x*4 >=  y >= x*2:
      for i in range(x+1):
        if (x*4) - ((x-i)*2) == y:
            print("YES")
            break
      else:
        print("NO")
    else:
        print("NO")
else:
      print("NO")

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
b = 0
if y % 2 != 0:
  print("NO")
  quit()
else:
  while x >= 0:
    c = x * 2 + b * 4
    if c == y:
      print("YES")
      quit()
    x -=1
    b +=1
print("NO")

Submission status: Wrong Answer

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

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict

def input(): return sys.stdin.readline().strip()
def INT(): return int(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()))#文字　複数の入力　配列


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

Submission status: Wrong Answer

Solution code:
import sys

x,y = map(int,input().split())
if y % 2 != 0:
    print('No')
    sys.exit()
    


if 4 * x < y:
    print('No')
    sys.exit()

if 4 * x >= y:
    if 2 * x <= y:
        print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

correct = False

for i in range(1,x):
    for j in range(1,x):
        if i * 4 + ((j - i) * 2) == y:
            correct = True
            break
        else:
            correct = False
    
if x == 1 and (y == 2 or y == 4):
    correct = True
                         
if correct == True:
    print ("Yes")
else:
    print ("No")

Submission status: Wrong Answer

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

turu_all = 2 * x
kame = (y - turu_all) / 2

turu = x - kame
if x == turu + kame:
    ans = "Yes"
    if kame > x or kame < 0:
        ans = "No"

print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np
X, Y=map(int,input().split())

crit=(4*X-Y)/2

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

print(ans)

Submission status: Wrong Answer

Solution code:
c = input()
c = c.split(' ')
x = int(c[0])
y = int(c[1])
sa = 4 * x -y
if sa % 2 == 0 and sa >= 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
if X == 1:
    if Y == 2 or Y == 4:
        print('Yes')
    else:
        print('No')
    exit()

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

print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

c = b - 2*a
d = c / 2

if(a==(c+d)):
    print("Yes")

else:
    print("No")

Submission status: Wrong Answer

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

#2z + 4(X-z) = Y
#-2z = Y - 4X
z = 2*X - 0.5*Y

if(0 < z and z.is_integer()):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
print("No" if b%a==0 else "Yes")

Submission status: Wrong Answer

Solution code:
from sys import stdin
X, Y = [int(x) for x in stdin.readline().rstrip().split()]
if Y % 2 == 0:
    Z = Y / X
    if 2 <= Z <= 4:
        print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

ans = (4*X-Y)/2

if ans.is_integer() and ans >0:
    print('yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
if x*4 < y:
    print("No")
elif x*2 == y:
    print("Yes")
elif x*4 == y:
    print("Yes")
elif x*2 < y:
    x1 = x - 1
    x2 = 1
    ans = x
    while ans < y:
        ans = (x1*2 + x2*4)
        if ans == y:
            print("Yes")
            exit()
        x1 -= 1
        x2 += 1
    print("No")

Submission status: Wrong Answer

Solution code:
x, y = [int(x) for x in input().split()]
print('Yes' if ((y-x*2)/2 <= x) else 'No')

Submission status: Wrong Answer

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

if  y//x >4:
    print('No')
elif y%x == 4 or y%x == 2:
    print('Yes')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
x,y=(int(x) for x in input().split())
1<=x<=100
1<=y<=100
z=y/x
if y>x*6:
    print('No')
elif y<x*2:
    print('No')
elif y%2==1:
    print('No')
elif y==4 and x==1:
    print('No')
elif z==2.5 or z==3.5 or z==4.5 or z==5.5:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

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

turu = (4 * X - Y) / 2

if turu.is_integer() and turu > 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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


main()

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
ans = 0
if Y%2 != 0:
    print('No')
    exit(0)
for i in range(X):
    ans += 4
if ans >= Y:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10000000)

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

if (y//2==x and y%2 ==0 ) : print('Yes');exit()
if (y//4==x and y%4 ==0 ) : print('Yes');exit()

for i in range(1,x):
    if (y-(i*4)) // 2 == x - y//(i*4) : print('Yes');exit()

for i in range(1,x):
    if (y-(i*2)) // 4 == x - y//(i*2) : print('Yes');exit()

print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys

x, y = map(int, input().split())
x *= 2
y -= x
if(y == 0):
  print('Yes')
  sys.exit()

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

print('No')

Submission status: Wrong Answer

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

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict

def input(): return sys.stdin.readline().strip()
def INT(): return int(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()))#文字　複数の入力　配列


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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
X,Y = map(int, input().split())
flg = 1
tsuru = X - ((Y - 2*X)/2)
amari = (float(Y) - float(2*X))%2

if(amari > 0):
  flg = 0
elif(tsuru<0):
  flg = 0
else:
  flg = 1

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c=a*4
if(b%2==1):
    print("NO")
else:
    if(c<b):
        print("NO")
    else:
        if(((c-b)/2)<=a):
            print("YES")
        else:
            print("NO")

Submission status: Wrong Answer

Solution code:
x, y = [int(i) for i in input().split()]
print("Yes") if ((2*x)-y/(-2) > 0 and y-(4*x)/(-2) > 0) or (x==0 and y==0)  else print("No")

Submission status: Wrong Answer

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

for k in range(102):
    kame = k
    turu = x-k
    ashi = 2*turu + 4*kame
    if ashi==y:
        count += 1
        break

if count>0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
int2=tuple(map(int,input().split()))
t=0
for a in range(0,int2[0]):
  for b in range(0,int2[0]):
    if a+b==int2[0] and 2*a+4*b==int2[1]:
      t+=1
      break
if t==0:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

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

crain = (4*X - Y) / 2
tu = X - crain
if crain.is_integer() and crain >= 0:
    print("Yes")
elif tu.is_integer() and tu >=0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a = input().split()
# 奇数の時
if int(a[1]) % 2 != 0 or int(a[0]) > int(a[1]):
    print('No')
elif int(a[0]) * 4 == int(a[1]) or int(a[0]) * 2 == int(a[1]):
    print('Yes')
elif 2 * int(a[0]) >= int(a[1]) and 2 * int(a[0]) - int(a[1]) / 2 >= 1:
    print('Yes')
elif 2 * int(a[0]) - int(a[1]) / 2 >= 1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
def main():
    x, y = map(int, input().split())
    a = (4*x-y)
    b = (y-2*x)

    out = 'No'

    if a>0 and b>0:
        a %= 2
        b %= 2
        if a==0 and b==0:
            out = 'Yes'

    if x==1 and (y==2 or y==4):
        out = 'Yes'

    print(out)

main()

Submission status: Wrong Answer

Solution code:
a = input().split(" ")
i = 0
f = 0
l = int(a[0])
s = int(a[1])
if (l * 4 < s) or (s % 2 == 1) :
    f = f + 1
    print("N0")
while (i < l) and (f == 0) and (l > 0):
    if (s - 4 >= 0) :
        l = l - 1
        s = s - 4
    if (s - 2 >= 0) and (s - 4 <= 0) :
        l = l - 1
        s = s - 2
if s == 0 :
    print("YES")

Submission status: Wrong Answer

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

ans = 0

#つるをi

for i in range(X):
  if 2*i ==  4*X - Y or 2*(i+1) == Y or 4*(X-i) == Y:
      ans +=1


if ans > 0:
  print('Yes') 
else:
  print('No')

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!

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

if(y > x*4):
    print("no")
else:
    if(y%2 == 1):
        print("no")
    else:
        print("yes")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

for _ in range(X):
    if Y - 4 >= 0:
        Y = Y - 4
    elif Y - 2 >= 0:
        Y = Y - 2

print('YES' if Y == 0 else 'NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import os
import sys
from io import BytesIO, IOBase
import math


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


def inputArray():
    return input().rstrip().split()


def inputVars():
    return map(int, input().rstrip().split())


def inputNum():
    return int(input())


def main():
    totalAnimals, noOfLegs = inputVars()
    if noOfLegs > totalAnimals*4:
        print('No')
    else:
        if (noOfLegs%4)%2 == 0:
            print('Yes')
        else:
            print('No')


#.........................................FAST INPUT OUTPUT.......................................
BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

#....................................END OF FAST I/O............................................

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

m=4*x

ans='Yes'

if m<y:
    ans='No'
elif y%2!=0:
    ans='No'

print(ans)

Submission status: Wrong Answer

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

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict

def input(): return sys.stdin.readline().strip()
def INT(): return int(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()))#文字　複数の入力　配列


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

Submission status: Wrong Answer

Solution code:
X,Y = map(int,input().split())
if 2*X == Y or 4*X == Y or 3*X == Y or Y%X ==1 or Y%X == 2:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n_animal, n_foot = map(int, input().split())

checker = False
for i in range(n_animal):
    n_kame = i
    n_tsuru = n_animal - n_kame
    n_foot_pred = n_kame * 4 + n_tsuru * 2
    
    if n_foot == n_foot_pred:
        checker = True
        break
    else:
        continue
if checker:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N,M=map(int,input().split())

for i in range(N):
    j=N-i
    if 2*i + 4*j == M:
        print("Yes")
        exit()

print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N, M = map(int,input().split())
for i in range(1, N+1):
    # 足の数
    f = 2 * i + 4 * (N - i)
    if f == M:
        print("Yes")
        break
else:
    print('No')

Submission status: Wrong Answer

Solution code:
X,Y = input().split()
A=int(Y)/2-int(X)
B=2*int(X)-int(Y)/2
if(A.is_integer and A>=0 and B>=0):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())

x=(4*n-m)/2
if x>=0:
  y=n-x
  ans=x+y
  if ans==n:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
z=[]
x, y= map(int,input().split())
for i in range(x+1):
    if (2*(i+1))+(4*(x-i+1))==y:
        z.append('1')
    if (4*i)+(2*(x-i))==y:
        z.append('1')
        

        
if len(z)>0:
    print('YES')

if len(z)<=0:
    print('NO')

Submission status: Wrong Answer

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

for k in range(101):
    kame = k
    turu = x-k
    ashi = 2*turu + 4*kame
    if ashi==y:
        count += 1
        break

if count>0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

if y%2 == 1 or 2*x > y:
  print('No')
  exit()

if x*2 == y:
  print('Yes')
  exit()

if x*4 == y:
  print('Yes')
  exit()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
if y == 2**x:
    print("Yes")

else:
    print("No")

Submission status: Wrong Answer

Solution code:
N, M = map(int,input().split())
for i in range(1, N+1,1):
    # 足の数
    f = 2 * i + 4 * (N - i)
    if f == M:
        print('Yes')
        break
else:
    print('No')

Submission status: Wrong Answer

Solution code:
def resolve():
	# N: number of Tsuru
	# Y = 2N + 4(X-N) = 4X -2N
	# print 'Yes' if int N exists for given equation or 'No'.
	# X: total animals, Y: total legs
	X, Y = map(int, input().split())
	K = (4 * X) - Y
	if Y % 2 != 0: # Y shuldn't odd.
		print('No')
	elif Y < 2: # 2*1 + 4*0 = 2
		print('No')
	elif 0 < K < 50:
		print('Yes')
	else:
		print('No')
resolve()

Submission status: Wrong Answer

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

def  get_CT(x,y):
  C=(4*x-y)/2
  T=x-C
  if C>=0 and T>=0:
    return 'Yes'
  T=(y-2*x)
  C=x-T
  if T>=0 and C>=0:
    return 'Yes'
  return 'No'
  
print(get_CT(X,Y))

Submission status: Wrong Answer

Solution code:
c = input()
c = c.split(' ')
x = int(c[0])
y = int(c[1])
sa = 4 * x -y
if sa % 2 == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
x, y = map(float, input().split())
cranes = (4 * x - y) / 2
turtles = x - cranes
if cranes.is_integer() and turtles.is_integer():
    if cranes >= 0 and turtles >= 0:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

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

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

#print("kame",kame)
#print("amari",amari)
#print("tsuru",tsuru)

if amari == 0:
  if kame >= 0 and tsuru >= 0:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
a = x
b = 0
if y % 2 != 0:
  print("NO")
  quit()
else:
  while a >= 0:
    c = a * 2 + b * 4
    if c == y:
      print("YES")
      quit()
    a -=1
    b +=1
print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N, M = map(int,input().split())
for i in range(1, N+1):
    # 足の数
    f = 2 * i + 4 * (N - i)
    if f == M:
        print('Yes')
        break
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N, M = map(int,input().split())
ans = 0
if N == 1 and (M == 2 or M == 4):
    print('Yes')
    ans = 1
for i in range(1,N+1):
    for j in range(1,N+1):
        if 2*i+4*j == M:
            print('Yes')
            ans = 1
            break
if ans == 0:
    print('No')

Submission status: Wrong Answer

Solution code:
a, b = list(map(int,input().split()))
if a>0: 
    if b % 2 ==0 or b%4==0:
        print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

def main():
    ans_1 = x * 4 #12
    ans_2 = ans_1 - y #4

    if ans_2 >= 0:
        for i in range(0, x):
            ans_2 = ans_2 - 2

            if ans_2 <= 0:
                print("Yes")
                return
        print("No")
        return
    else:
        print("No")
        return
main()

Submission status: Wrong Answer

Solution code:

from functools import *
import sys
sys.setrecursionlimit(100000)
import numpy as np

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


def score(n,point):
    global solved
    #print(solved[n])
    return np.dot(solved[n],point)
    
X,Y=acinput()

b=(Y-2*X)/2

if b%1.0==0 and X-b>=0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10000000)

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

if (y//2==x) : print('Yes');exit()
if (y//4==x) : print('Yes');exit()

for i in range(1,x):
    if (y-(i*4)) // 2 == x - y//(i*4) : print('Yes');exit()

for i in range(1,x):
    if (y-(i*2)) // 4 == x - y//(i*2) : print('Yes');exit()

print('No')

Submission status: Wrong Answer

Solution code:
# Xは動物の総数,Yは動物の足の総数
X,Y = map(int, input().split())

# 亀は4本の足を持ち，鶴は2本の足を持つ．
kame = 4
turu = 2

# まずは鶴が1匹の時だけを判定,奇数は有えないので排除
if Y == 2 and X == 1:
  print("Yes")
elif Y == 100 and X*kame < Y:
  print("No")
elif Y % turu != 0:
  print("No")
elif X*kame < Y:
  print("No")
else:
  ans = Y
  while True:
    Y = Y % 2
    ans = ans/2
    if Y != 0:
      print("No")
      break
    elif Y == 0 and ans == 0:
      print("Yes")
      break 
    else:
      print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X,Y = map(int,input().split())
isOK = False
kame = 0
turu = int(Y/2)
if turu == X:
  isOK = True
for i in range(turu-X):
  if (turu+kame) == X:
    isOK = True
    break
  if turu != X:
    kame = kame + 1
    turu = turu - 2
if Y%2 == 1:
  isOK=False
if isOK == True:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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


crain = (4 * x - y) / 2
turtle = (y - 2*x) /2 
if crain.is_integer() and crain >= 0:
    crain = int(crain)
    print('Yes')
#elif crain == 0 or turtle == 0:
    #print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

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

turu = A[0] * 2
min_leg = A[1] - turu
kame = min_leg / 2
Ans = A[0] - kame

if Ans < 0 or Ans > A[0]:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

if Y % 2 == 1:
    print('No')
elif X * 4 < Y:
    print('No')
elif Y % 2 == 0 and X * 4 >= Y:
    count = 0
    while True:
        Y = Y / 2
        count += 1
        if Y == 1:
            break
    if count == X:
        print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

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

if x > 0 and x.is_integer():
  print("Yes")
elif y > 0 and y.is_integer():
  print("Yes")
else:
  print("No")