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:
X, Y = map(int, input().split())
if X*4 < Y:
  print('No')
elif Y % 2 == 0:
  diff = Y - X*2
  quo, remain = divmod(diff, 2)
  if remain == 0 and 1 < quo <= X:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
a,l=map(int,input().split())
s=0
if l/a==2 or l/a==4:
	print("YES")
else:
	t,f=0,0
	for i in range(1,a+1):
		t+=1*2
		f+=1*4
	if f>l:
		while f!=l:
			f=f-2
		if f==l:
			print("YES")
		else:
			print("NO")
	else:
		print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N, M = map(int,input().split())
crain = (4 * N - M) / 2
R = N - int(crain)
if crain.is_integer() or R >= 0:
    print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
 
n = (X*4 - Y) / 2

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

Submission status: Wrong Answer

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

no_flag = 0

if y - (4 * x) == 0:
    print("Yes")
elif y - (2 * x) == 0:
    print("Yes")
else:
    for cnt in range(x+1):
        if y >= 4 and y - (2 * (x-(cnt))) != 0:
            y -= 4
        elif y >= 2:
            y -= 2

        if y == 0 and cnt == x-1:
            no_flag = 0
        else:
            no_flag = 1

    if no_flag == 0:
        print("Yes")
    elif no_flag == 1:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
X, Y = map(int, input().split())
if X*4 < Y:
  print('No')
  sys.exit(0)
diff = Y - X*2
quo, remain = divmod(diff, 2)
if remain == 0:
  if quo > X or quo <= 1:
    print('No')
  else:
    print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N, M = map(int,input().split())
crain = (4 * N - M) / 2
R = N - int(crain)
if crain.is_integer() and crain >= 0 or R > 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
 
if y % 2 == 1 or x * 4 < y:
    print("No")
    exit() 
asi = 0
 
for i in range(x+1):
    asi = 0
    for j in range(x+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()))
ans = y / 2 - x 
if y % 2 == 0 and 1 <= ans <= x:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N, M = map(int,input().split())
crain = (4 * N - M) / 2
R = N - int(crain)
if crain.is_integer() and crain >= 0:
  if R > 0:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
if X*4 < Y:
  print('No')
elif Y % 2 == 0:
  diff = Y - X*2
  quo, remain = divmod(diff, 2)
  if diff < 4:
    print('No')
  elif remain == 0 and quo <= X:
      print('Yes')
  else:
      print('No')
else:
  print('No')

Submission status: Wrong Answer

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

if X % 2 == 1 and Y % 2 == 1:
    print('No')
    exit()

v = -Y + 4 * X
# print('v', v)
if v % 2 != 0:
    print('No')
    exit()

if v < 0:
    print('No')
    exit()

if X < v:
    print('No')
    exit()

print('Yes')

# a: turu, b: kame
# a * 2 + b * 4 = Y
# a + b = X

# b = X - a
# a * 2 + (X - a) * 4 = Y
# 4 * X - 2 * a = Y を満たす a があるか
# a = (- Y + 4 * X) / 2

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
 
n = (X*4 - Y) / 2

if n >=0 and n <= Y:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,l=map(int,input().split())
s=0
if l/a==2 or l/a==4:
	print("YES")
else:
	t,f=0,0
	for i in range(1,a+1):
		t+=i*2
		f+=i*4
	if f>l:
		while f!=l:
			f=f-2
		if f==l:
			print("YES")
		else:
			print("NO")
	else:
		print("NO")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
 
n = (X*4 - Y) / 2

if n >=0 and n <= Y and n.is_integer():
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

v = -Y + 4 * X
# print('v', v)
if v % 2 != 0:
    print('No')
    exit()

if v < 0:
    print('No')
    exit()

if X < v:
    print('No')
    exit()

print('Yes')

# a: turu, b: kame
# a * 2 + b * 4 = Y
# a + b = X

# b = X - a
# a * 2 + (X - a) * 4 = Y
# 4 * X - 2 * a = Y を満たす a があるか
# a = (- Y + 4 * X) / 2

Submission status: Wrong Answer

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

X,Y = input().split()
X,Y =int(X), int(Y)
turu=(4 * X - Y) / 2

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

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
if X*4 < Y:
  print('No')
elif Y % 2 == 0:
  diff = Y - X*2
  quo, remain = divmod(diff, 2)
  if remain == 0 and quo <= X:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Submission status: Wrong Answer

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

turu = 2
kame = 4
flag = 0

for x in range(a + 1):
    # print("xです{}".format(x))
    for y in range(a + 1):
        # print("yです{}".format(y))
        if kame * x + turu * y == b and (x + y) <= a:
            flag += 1
if flag == 0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
num, ans = map(int, input().split())
# num, ans = 10, 28

def dead():
    if (num*4 < ans):
        return False
    if (ans % 2 == 1):
        return False
    return True

def fin():
    if (ans == 2 or ans == 4):
        return True
    return False

def check():
    kame = 0
    tsuru = 0
    for i in range(num):
        kame = i
        for j in range(num):
            tsuru = j
            if (kame * 4 + tsuru * 2 == ans and kame + tsuru == num):
                return True

if __name__ == '__main__':
    if (dead):
        if (fin()):
            print("Yes")
        elif (check()):
            print("Yes")
        else:
            print("No")
    else:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b = [int(i) for i in input().split()]
ans='No'

y=b/2-a #animal de 4 patas
x= -b/2 + 2*a

if x>=0 and y>=0: ans='Yes'
print(ans)

Submission status: Wrong Answer

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

print(X*2<=Y and Y<=X*4 and "Yes" or "No")

Submission status: Wrong Answer

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

no_flag = 0

if y - (4 * x) == 0:
    print("Yes")
elif y - (2 * x) == 0:
    print("Yes")
else:
    for cnt in range(x):
        if y >= 4 and y - (2 * (x-(cnt))) != 0:
            y -= 4
        elif y >= 2:
            y -= 2

        if y == 0 and cnt == x-1:
            no_flag = 0
        else:
            no_flag = 1

    if no_flag == 0:
        print("Yes")
    elif no_flag == 1:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = [int(i) for i in input().split()]
if n[0]*4 >= n[1] and n[1]%2 == 0 and n[1] > n[0] and n[0] != n[1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
x=(b-(2*a))/2
if x==int(x):
    y=a-x
    if y>=0:
        print("Yes")
    else:
        print("No")
else:
    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()
    tortoise = (noOfLegs - (totalAnimals * 2)) // 2
    crane = totalAnimals - tortoise
    if (noOfLegs - (totalAnimals * 2)) % 2 == 0 or (
            tortoise + crane == totalAnimals and tortoise * 4 + crane * 2 == noOfLegs):
        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:
a,b=map(int,input().split())
x=(b-2*a)/2
if x==int(x):
    y=a-x
    if y>=0:
        print("Yes")
    else:
        print("No")
else:
    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:
        tortoise = (noOfLegs-(totalAnimals*2))//2
        crane = totalAnimals-tortoise
        if (noOfLegs-(totalAnimals*2))%2 == 0 or(tortoise+crane==totalAnimals and tortoise*4+crane*2==noOfLegs):
            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())
a = y - x*2
b = a / 2
if a%2 == 0 and b <= x:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

X,Y = input().split()
X,Y =int(X), int(Y)
turu=(4 * X - Y) / 2

if turu.is_integer():
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

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

if ((a+b) == X) and ((2*a+4*b) == Y):
    print('Yes')
else:
    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-(totalAnimals*2))%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:
n = [int(i) for i in input().split()]
if n[0]*4 >= n[1] or n[1]%2 == 0 or n[1] > n[0] or n[0] != n[1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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

print("No")

Submission status: Wrong Answer

Solution code:
a = input().split()
b = int(a[0])
add = []
c = int(a[1])  

while b > 0:
  add.append(b * 4)
  b -= 1

d = max(add)
e = min(add)

if  d >= c or c == 2:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
turu = 4
kame = 2
flag = 'No'
for i in range(0,a):
  for j in range(0,a):
    if b == turu * j + kame * i:
      flag = 'Yes'
 
print(flag)

Submission status: Wrong Answer

Solution code:
x,y = map(int, input().split())
crane = [2]*x
turtle = [4]

for _ in range(len(crane)):
  crane[_] = 4
  #print (_)
  #print (crane)
  #print (sum(crane))
  if sum(crane) == y:
    print ("Yes")
    exit()
  if len(crane) == 1:
    print ("Yes")
    exit()
print ("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

turu = 1
kame = 1

#for i in range(0,25):
#    turu = i
while y % turu*2 + kame*4 == 0:
	print("Yes")
else:
    turu += 1
    turuf = turu * 2
    kamef = kame * 4
    if turuf == 50:
        kame += 1
        turu = 1

if kamef == 26:
	print("No")
else:
	print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

turu = 2
kame = 4
flag =0

for x in range(a + 1):
    # print("xです{}".format(x))
    for y in range(a + 1):
        # print("yです{}".format(y))
        if kame * x + turu * y == b and (x + y) <= a:
            flag += 1
            

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
turu = 2 * A - B // 2
kame = B // 2 - A
if (turu > 0) and (kame > 0):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X,Y=map(int,input().split())
def s(X,Y):
    for i in range(0,X+1):
        for j in range(i+1,X+2):
            if (2*i+4*j)==Y or (2*j+4*i)==Y:
                return " Yes "
    return " No "
print(s(X,Y))

Submission status: Wrong Answer

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

if 4*x>y:
    print("Yes")

else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import numpy as np
x = input().split(' ')

A = np.matrix([[1, 1], [2, 4]])
Y=np.matrix([[int(x[0])], [int(x[1])]])

ans = np.linalg.inv(A) * Y
if isinstance(ans[0],int) and isinstance(ans[1],int):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n=input()
x,y=n.split()
c=(4*int(x)-int(y))/2
print(type(c))
t=int(x)-c
if c.is_integer is True and t.is_integer is True and 100>=c>=0 and 100>=t>=0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**9)

INF = 10**20
def main():
    X,Y = map(int,input().split())

    k = (Y-2*X)//2
    t = X-k

    if t == 0:
        print("Yes" if k>0 else "No")
        exit()

    if k == 0:
        print("Yes" if t>0 else "No")
        exit()

    if k < 0 or t < 0:
        print("No")
        exit()

    if k > 0 and t > 0:
        print("Yes")
        exit()

    print("Yes")



if __name__ == "__main__":
  main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

X,Y = list(map(int, input().rstrip().split()))
#-----
crane = int( (4*X - Y) / 2 )
tortoise = int( (-2*X + Y) / 2 )

if (0 <= crane <= 100) and (0 <= tortoise <= 100):
    if crane == tortoise == 0:
        print("No")
    
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N, M = map(int,input().split())
crain = (4 * N - M) / 2
R = N - int(crain)
if crain.is_integer():
  if R >= 0:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Wrong Answer

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

turu = xs[0]
kame = 0
head = xs[0]

result = ""
for _ in range(head):
    if turu * 2 == xs[1]:
        result = "Yes"
        break
    else:
        kame += 1
        turu -= 1
        if kame * 4 + turu * 2 == xs[1]:
            result = "Yes"
            break
        else:
            result = "No"
            
print(result)

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:
X, Y = map(int, input().split())

if Y <= X * 4 and Y % 2 == 0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
x,y = map(int, input().split())
crane = [2]*x
turtle = [4]

for _ in range(len(crane)):
  crane[_] = 4
  #print (_)
  #print (crane)
  #print (sum(crane))
  if sum(crane) == y:
    print ("Yes")
    exit()
  if len(crane):
    print ("Yes")
    exit()
print ("No")

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
turu = 2 * A - B // 2
kame = B // 2 - A
if (turu >= 0) and (kame >= 0):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
var = input()
l = var.split(' ')
flag = 0
for x in range(int(l[0])):
  if -2*x + 4*int(l[0]) == int(l[1]):
    print('Yes')
    flag = 1
if flag == 0:
  print('No')

Submission status: Wrong Answer

Solution code:
N, M = map(int,input().split())
crain = (4 * N - M) / 2
R = N - int(crain)
if crain.is_integer():
  if crain >= 0 or R > 0:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if b%2==0:
  x=b/2-a
  y=2*a-b/2
  if x >=0 and y>=0:
    print('YES')
  else:
    print('NO')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
import numpy as np
x = input().split(' ')

A = np.matrix([[1, 1], [2, 4]])
Y=np.matrix([[int(x[0])], [int(x[1])]])

ans = np.linalg.inv(A) * Y
if isinstance(ans[0],int) and isinstance(ans[1].int):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict
 
x,y = map(int,input().split())
 
for i in range(1, x+1):
    # 足の数
    f = 2 * i + 4 * (x - i)
    if f == y:
        print('Yes')
        sys.exit()
    elif i==x+1: 
    	print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

if ((a+b) == X) and ((2*a+4*b) == Y):
    print('Yes')
print('No')

Submission status: Wrong Answer

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

if (X * 2 >= Y or X * 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())
max = x * 4
if y % 2 != 0:
  print('No')
elif max < y + 1:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
def main():
    souwa,ashi=map(int,input().split())
    if souwa*2==ashi or souwa*4==ashi:
        print('Yes')
    else:
        allturu=souwa*2
        kame=(ashi-allturu)/2
        turu=souwa-kame
        if turu+kame==souwa and turu*2+kame*4==ashi and turu>0:
            print('Yes')
        else:
            print('No')
if __name__ == "__main__":
    main()
#12 31

Submission status: Wrong Answer

Solution code:
x,y = map(int, input().split())
a = y - x*2
b = a / 2
if a%2 == 0 and b <= x:
  print("yes")
else:
  print("no")

Submission status: Wrong Answer

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