problem_id
stringlengths
6
6
user_id
stringlengths
10
10
time_limit
float64
1k
8k
memory_limit
float64
262k
1.05M
problem_description
stringlengths
48
1.55k
codes
stringlengths
35
98.9k
status
stringlengths
28
1.7k
submission_ids
stringlengths
28
1.41k
memories
stringlengths
13
808
cpu_times
stringlengths
11
610
code_sizes
stringlengths
7
505
p02640
u231518782
2,000
1,048,576
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.
["X,Y = list(map(int,input().split()))\n\nflag = 0\n\nfor x in range(1,X+1):\n print(x)\n if 4 * X - 2 * x == Y:\n flag = 1\n\nif X == 1 and Y == 2:\n flag = 1\nif X == 1 and Y == 4:\n flag = 1\n\nif flag == 1:\n print('Yes')\nelse:\n print('No')\n", "X,Y = list(map(int,input().split()))\n\nflag = 0\n\nfor x in range(0,X+1):\n if 4 * X - 2 * x == Y:\n flag = 1\n break\n\nif X == 1 and Y == 2:\n flag = 1\nif X == 1 and Y == 4:\n flag = 1\n\nif flag == 1:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s735498421', 's008915369']
[9184.0, 9192.0]
[23.0, 21.0]
[253, 253]
p02640
u237584412
2,000
1,048,576
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.
["X,Y = map(int, input().split())\n\nans = (4*X-Y)/2\n\nif ans.is_integer() and ans >0:\n print('yes')\nelse:\n print('No')\n", "X,Y = map(int, input().split())\n\nfor i in range(1,X+1):\n foot = 2*i+4*(X-i)\n if foot==Y:\n print('Yes')\n break\n elif X==i and Y==4*i:\n print('Yes')\n break\nelse:\n print('No')\n"]
['Wrong Answer', 'Accepted']
['s816381564', 's707844795']
[9172.0, 9172.0]
[22.0, 22.0]
[121, 213]
p02640
u242316925
2,000
1,048,576
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.
['from sys import stdin, stdout\nimport sys\nimport bisect\nINF=1e9\ndef get_int(): return int(stdin.readline().strip())\ndef get_ints(): return map(int,stdin.readline().strip().split()) \ndef get_array(): return list(map(int,stdin.readline().strip().split()))\ndef get_string(): return stdin.readline().strip()\ndef op(c): return stdout.write(c)\n#from collections import defaultdict \n#for _ in range(int(stdin.readline())):\nx,y=get_ints()\nif y%2==0:\n if y>=2*x and y<=4*x:\n print("YES")\n else:\n print("NO")\nelse:\n print(\'NO\')', 'from sys import stdin, stdout\nimport sys\nimport bisect\nINF=1e9\ndef get_int(): return int(stdin.readline().strip())\ndef get_ints(): return map(int,stdin.readline().strip().split()) \ndef get_array(): return list(map(int,stdin.readline().strip().split()))\ndef get_string(): return stdin.readline().strip()\ndef op(c): return stdout.write(c)\n#from collections import defaultdict \n#for _ in range(int(stdin.readline())):\nx,y=get_ints()\nif y%2==0:\n if y>=2*x and y<=4*x:\n print("YES")\n else:\n print("NO")\nelse:\n print(\'NO\')', 'from sys import stdin, stdout\nimport sys\nINF=1e9\ndef get_int(): return int(stdin.readline().strip())\ndef get_ints(): return map(int,stdin.readline().strip().split()) \ndef get_array(): return list(map(int,stdin.readline().strip().split()))\ndef get_string(): return stdin.readline().strip()\ndef op(c): return stdout.write(c)\n#from collections import defaultdict \n#for _ in range(int(stdin.readline())):\nx,y=get_ints()\nif y%2==0:\n if y>=2*x and y<=4*x:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s267717902', 's959437953', 's248655268']
[9076.0, 9208.0, 9200.0]
[24.0, 25.0, 23.0]
[539, 539, 525]
p02640
u243312682
2,000
1,048,576
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.
["def main():\n x = int(input())\n y = int(input())\n l = list()\n l.append(2*x)\n for i in range(1, x+1):\n l.append(2*x + i*2)\n if y in l:\n print('Yes')\n else:\n print('No')\n \nif __name__ == '__main__':\n main()", "def main():\n x, y = map(int, input().split())\n l = list()\n l.append(2*x)\n for i in range(1, x+1):\n l.append(2*x + i*2)\n if y in l:\n print('Yes')\n else:\n print('No')\n\nif __name__ == '__main__':\n main()"]
['Runtime Error', 'Accepted']
['s862958060', 's439504108']
[9180.0, 9176.0]
[21.0, 20.0]
[255, 242]
p02640
u243572357
2,000
1,048,576
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.
["x, y = map(int, input().split())\ns = 'No'\nif 2 * x > y or 4 * x < y:\n s = 'No'\nelif y % 2 == 0:\n s = 'No'\nelif 2 * x == y or 4 * x == y:\n s = 'Yes'\nelif (4*x - y) // 2 <= x:\n s = 'Yes'\nelse:\n s = 'No'\n\nprint(s)", "x, y = map(int, input().split())\ns = 'No'\nif 2 * x > y or 4 * x < y:\n s = 'No'\nelif y % 2 != 0:\n s = 'No'\nelif 2 * x == y or 4 * x == y:\n s = 'Yes'\nelif (4*x - y) // 2 <= x:\n s = 'Yes'\nelse:\n s = 'No'\n\nprint(s)"]
['Wrong Answer', 'Accepted']
['s916697579', 's876494256']
[9144.0, 9144.0]
[26.0, 30.0]
[215, 215]
p02640
u246448955
2,000
1,048,576
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.
["x, y = map(int, input().split())\ndef func(x,y):\n for i in range(x+1):\n for j in range(x+1):\n if i+j!=x:\n break\n if ((i*2 + j*4) == y) or ((j*2 + i*4) == y):\n print('Yes')\n return\n print('No')\n return\nfunc(x,y)", "x = list(map(int, input().split()))\ndef func(x):\n for i in range(0,1,x[0]+1):\n for j in range(0,1,x[0]+1):\n if i+j>x[0]:\n break\n if i*2 + j*4 == x[1]:\n print('Yes')\n return\n print('No')\n return\nfunc(x)", "x = list(map(int, input().split()))\ndef func(x):\n for i in range(x[0]+1):\n for j in range(x[0]+1):\n if i+j>x[0]:\n break\n elif i*2 + j*4 == x[2] or j*2 + i*4 == x[2]:\n print('Yes')\n return\n print('No')\n return\nfunc(x)", "x, y = map(int, input().split())\ndef func(x,y):\n for i in range(x+1):\n for j in range(x+1):\n if i+j==x:\n if i*2 + j*4 == y:\n print('Yes')\n return\n print('No')\n return\nfunc(x,y)"]
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s101112325', 's398431709', 's463098416', 's656007457']
[9192.0, 9180.0, 9184.0, 9120.0]
[23.0, 22.0, 28.0, 25.0]
[292, 284, 299, 256]
p02640
u246809151
2,000
1,048,576
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.
['x,y = map(int, input().split())\ncnt2 = 0\ncnt4 = 0\nfor i in range(101):\n cnt2 = 2*(i)\n cnt4 = 4*(x-i)\n print(cnt2,cnt4)\n if cnt2 + cnt4 == y:\n print("Yes")\n exit()\n\nprint("No")\n', 'x,y = map(int, input().split())\n\nfor i in range(x+1):\n if i*2 + (x-i)*4 == y:\n print("Yes")\n exit()\n\nprint("No")\n']
['Wrong Answer', 'Accepted']
['s508201697', 's130210913']
[9204.0, 8964.0]
[22.0, 26.0]
[202, 130]
p02640
u247211039
2,000
1,048,576
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.
["X,Y = map(int, input().split())\n\n\n\n\nfor i in range(X):\n if 2*i == 4*X - Y and i != 0:\n ans +=1\n elif 2*(i+1) == Y:\n ans +=1\n elif 4*(X-i) == Y:\n ans +=1\n\n\nif ans > 0:\n print('Yes') \nelse:\n print('No')", "X,Y = map(int, input().split())\n\nans = 0\n\n\n\nfor i in range(Y):\n for j in range(Y):\n if 2*i + 4*j == Y and i + j == X:\n ans +=1\n \n \nif ans > 0:\n print('Yes') \nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s797137037', 's565346569']
[9192.0, 9176.0]
[23.0, 22.0]
[232, 214]
p02640
u248670151
2,000
1,048,576
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.
['arr = list(map(int, input("").split()))\nx=2*arr[0]\ny=4*arr[0]\n\nif arr[1]>=x and arr[1]<=y and arr[1]%2==0:\n print("YES")\nelse :\n print("NO")\n ', 'arr = list(map(int, input("").split()))\nx=2*arr[0]\ny=4*arr[0]\n\nif arr[1]>=x and arr[1]<=y and arr[1]%2==0:\n print("Yes")\nelse :\n print("No")\n ']
['Wrong Answer', 'Accepted']
['s515481391', 's234020341']
[9060.0, 9160.0]
[28.0, 28.0]
[151, 151]
p02640
u249077731
2,000
1,048,576
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.
['x,y = map(int,input().split())\nif (y - 2*x) % 2 == 0 and (y - 2*x) >0 and (4*x - y) >0:\n print("OK")\nelse:\n print("NO")', 'x,y = map(int,input().split())\nif (y - 2*x) % 2 == 0 and (y - 2*x) >= 0 and (4*x - y) >= 0:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s897343512', 's677360359']
[9168.0, 9100.0]
[27.0, 34.0]
[125, 130]
p02640
u250413186
2,000
1,048,576
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.
["import sys\n\nX,Y=(int(x) for x in input().split())\nprint(X,Y)\nif Y%2==1:\n print('No')\n sys.exit()\n \n\ncheck=int((Y-2*X)/2)\nif check<=X:\n print('Yes')\nelse:\n print('No')", "import sys\n\nX,Y=(int(x) for x in input().split())\n\nif Y%2==1:\n print('No')\n sys.exit()\nif Y<2*X:\n print('No')\n sys.exit()\n \n\ncheck=int((Y-2*X)/2)\n#print(check)\nif check<=X:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s834646065', 's528303988']
[9184.0, 9188.0]
[23.0, 21.0]
[171, 223]
p02640
u255943004
2,000
1,048,576
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.
['X,Y = map(int,input().split())\nif Y % 2 == 0 and X * 4 >= Y and X * 2 <= Y:\n print("Yes")\nelse \n print("No")', 'X,Y = map(int,input().split())\nif Y % 2 == 0 and X * 4 >= Y and if X * 2 <= Y:\n print("Yes")\nelse \n print("No")', 'X,Y = map(int,input().split())\nif Y%2==0 and (X*2 <= Y and X*4 >= Y):\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Runtime Error', 'Accepted']
['s226716961', 's292483889', 's840758542']
[9016.0, 9016.0, 9004.0]
[21.0, 21.0, 26.0]
[114, 117, 104]
p02640
u256252286
2,000
1,048,576
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.
["import os\n\ndef main():\n args = list(map(int, input().split()))\n nb = args[0]\n nl = args[1]\n if nb == 0 or (nl % 2 == 1):\n print('No')\n return\n if (nl / 4.0) > nb:\n print('No')\n return\n for i in range(1, nb):\n if (nl % (i * 4)) % 2 == 0:\n print('Yes')\n print('No')\n\nif __name__ == '__main__':\n main()\n", "import os\n\ndef main():\n args = list(map(int, input().split()))\n nb = args[0]\n nl = args[1]\n if nb == 0 or (nl % 2 == 1):\n print('No')\n return\n if (nl / 4.0) > nb:\n print('No')\n return\n for i in range(1, nb):\n if ((nb - i) * 2 + i * 4) == nl:\n print('Yes')\n print('No')\n\nif __name__ == '__main__':\n main()\n", "import os\n\ndef main():\n args = list(map(int, input().split()))\n nb = args[0]\n nl = args[1]\n if nb == 0 or (nl % 2 == 1):\n print('No')\n return\n if (nl / 4.0) > nb:\n print('No')\n return\n for i in range(1, nb + 1):\n if ((nb - i) * 4 + i * 2) == nl:\n print('Yes')\n print('No')\n\nif __name__ == '__main__':\n main()\n", "import os\n\ndef main():\n args = list(map(int, input().split()))\n nb = args[0]\n nl = args[1]\n if nl / (nb * 4) > nb:\n print('NO')\n return\n if (nl % (nb * 2)) % 2 == 0:\n print('YES')\n else:\n print('NO')\n\nif __name__ == '__main__':\n main()", "import os\n\ndef main():\n args = list(map(int, input().split()))\n nb = args[0]\n nl = args[1]\n if nb == 0 or (nl % 2 == 1) or nl == 0 or nl > nb:\n print('No')\n return\n for i in range(1, nb + 1):\n if ((nb - i) * 4 + i * 2) == nl:\n print('Yes')\n return\n print('No')\n\nif __name__ == '__main__':\n main()\n", "import os\n\ndef main():\n args = list(map(int, input().split()))\n nb = args[0]\n nl = args[1]\n if nb == 0 or (nl % 2 == 1) or nl == 0 or nb > nl or (nl / 4.0) > nb:\n print('No')\n return\n for i in range(nb + 1):\n if ((nb - i) * 4 + i * 2) == nl:\n print('Yes')\n return\n print('No')\n\nif __name__ == '__main__':\n main()\n"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s184909610', 's350003252', 's716702104', 's871274101', 's994256930', 's727903102']
[9192.0, 9196.0, 9188.0, 9176.0, 9128.0, 9196.0]
[25.0, 22.0, 21.0, 24.0, 22.0, 20.0]
[328, 333, 337, 254, 323, 339]
p02640
u257332942
2,000
1,048,576
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.
["x, y = map(int, input().split())\n\nfor a in range(x + 1):\n if a == - y / 2 + x:\n print('Yes')\n exit(1)\n\nprint('No')\n", "x, y = map(int, input().split())\n\nfor a in range(x + 1):\n tem = 2 * a + 4 * (x - a)\n if (tem == y):\n # and (2 * x <= y <= 4 * x):\n print('Yes')\n exit()\n\nprint('No')"]
['Runtime Error', 'Accepted']
['s848370492', 's799273769']
[9156.0, 9168.0]
[22.0, 25.0]
[133, 192]
p02640
u258000141
2,000
1,048,576
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.
['x,y=map(int,input().split())\nif x*4>=y and y%2==0 and x*2<=y:print("是")\nelse:print("没有")', 'x,y=map(int,input().split())\nif x*4>=y and y%2==0 and x*2<=y:print("Yes")\nelse:print("No")']
['Wrong Answer', 'Accepted']
['s421316323', 's576401998']
[9160.0, 9056.0]
[28.0, 24.0]
[94, 90]
p02640
u262801165
2,000
1,048,576
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.
['import sys\nimport math\nimport collections\nimport decimal\nimport itertools\nfrom collections import deque\nfrom functools import reduce\nimport heapq\n#n = int(input())\nx, y = map(int, sys.stdin.readline().split())\n#s = input()\n#x = list(map(int, sys.stdin.readline().split()))\n \n\nif 2 ** x > y:\n print("NO")\n sys.exit()\n\nif 4 ** x < y:\n print("NO")\n sys.exit()\n\nif y % 2 == 1:\n print("NO")\nelse:\n print("YES")\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n', 'import sys\nimport math\nimport collections\nimport decimal\nimport itertools\nfrom collections import deque\nfrom functools import reduce\nimport heapq\n#n = int(input())\nx, y = map(int, sys.stdin.readline().split())\n#s = input()\n#x = list(map(int, sys.stdin.readline().split()))\n \n\nif 2 * x > y:\n print("No")\n sys.exit()\n\nif 4 * x < y:\n print("No")\n sys.exit()\n\nif y % 2 == 1:\n print("No")\nelse:\n print("Yes")\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n']
['Wrong Answer', 'Accepted']
['s686496297', 's029592598']
[10024.0, 9988.0]
[24.0, 29.0]
[447, 445]
p02640
u263352518
2,000
1,048,576
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.
['x = list(map(lambda x:int(x), input().split()))\nX = x[0]\nY = x[1]\n\nkame = (Y-X*2)//2\nprint(kame)\n\nif kame >= 0 and X-kame >= 0 and Y - kame*4 == (X-kame)*2:\n print("Yes")\nelse:\n print("No")', 'x = list(map(lambda x:int(x), input().split()))\nX = x[0]\nY = x[1]\n\nkame = (Y-X*2)//2\n#print(kame)\n\nif kame >= 0 and X-kame >= 0 and Y - kame*4 == (X-kame)*2:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s880984515', 's835799221']
[9192.0, 9120.0]
[23.0, 21.0]
[191, 192]
p02640
u264167735
2,000
1,048,576
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.
['X, Y = map(int,input().split())\n\ncrain = (4 * X - Y) / 2\nturtle = (Y - 2 * X) / 2\n\nif (crain.is_integer() and crain >= 0) and ( turtle.is_integer() and turtle >= 0):n*2))\n print ("Yes")\nelse:\n print ("No")\n', 'X, Y = map(int,input().split())\n\ncrain = (4 * X - Y) / 2\nturtle = (Y - 2 * X) / 2\n\nif (crain.is_integer() and crain >= 0) and ( turtle.is_integer() and turtle >= 0):\n print ("Yes")\nelse:\n print ("No")\n']
['Runtime Error', 'Accepted']
['s060249629', 's749815574']
[9028.0, 9172.0]
[19.0, 24.0]
[212, 207]
p02640
u265118937
2,000
1,048,576
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.
['import numpy as np\nx, y = map(int, input().split())\nans = -1\n\na = np.array([[2, 4], [1, 1]])\nb = np.array([y, x])\nc, d = np.linalg.solve(a, b)\nc = int(c)\nd = int(d)\nprint(c, d)\nif c + d == x and c >= 0 and d >= 0:\n print("Yes")\nelse:\n print("No")', 'import numpy as np\nx, y = map(int, input().split())\n\na = np.array([[2, 4], [1, 1]])\nb = np.array([y, x])\nc, d = np.linalg.solve(a, b)\nc = int(c)\nd = int(d)\n\nif c + d == x and c >= 0 and d >= 0:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s711144383', 's392911843']
[27488.0, 27516.0]
[99.0, 106.0]
[252, 232]
p02640
u267482423
2,000
1,048,576
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.
['\nX,Y = map(int,input().split())\nflag = False\nfor i in range(1,X+1):\n for j in range(X-i):\n \n if 2*i+4*j == Y:\n flag = True\n break\n\n\nif flag:\n print("Yes")\nelse:\n if X == 1:\n if Y == 2 or Y == 4:\n print("Yes")\n else:\n print("No")', '\nX,Y = map(int,input().split())\nflag = False\n\nif X == 1:\n if (Y == 2) or (Y == 4):\n flag = True\n \nfor i in range(X):\n for j in range(X):\n if i + j != X:\n continue\n print(i,j)\n print(2*i+4*j)\n if 2*i+4*j == Y:\n flag = True\n break\n\n\nif flag == True:\n print("Yes")\nelse:\n print("No")', '\nX,Y = map(int,input().split())\nflag = False\n\nif X == 1:\n if (Y == 2) or (Y == 4):\n flag = True\n \nfor i in range(X+1):\n for j in range(X+1):\n if (i + j) == X:\n if 2*i+4*j == Y:\n flag = True\n break\n\n\nif flag == True:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s469583526', 's637424006', 's614098688']
[9184.0, 9196.0, 9160.0]
[22.0, 19.0, 24.0]
[301, 367, 322]
p02640
u268183312
2,000
1,048,576
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.
["y, x = map(int, input().split())\n\ntsuru = (x-2*y)/2\nkame = (4*y-x)/2\nif tsuru < 0 or kame < 0:\n print('no')\nelif (x-2*y)%2 == 0 and (4*y-x)%2 == 0:\n print('yes')\nelse:\n print('no')", "y, x = map(int, input().split())\n\ntsuru = (x-2*y)/2\nkame = (4*y-x)/2\nif tsuru < 0 or kame < 0:\n print('No')\nelif (x-2*y)%2 == 0 and (4*y-x)%2 == 0:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s581149481', 's559961800']
[9192.0, 9124.0]
[23.0, 22.0]
[183, 183]
p02640
u268792407
2,000
1,048,576
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.
['x,y=map(int,input().split())\nif 2*x <= y <= 4 and y%2==0:\n print("Yes")\nelse:\n print("No")', 'x,y=map(int,input().split())\nfor i in range(x+1):\n t=i*2+(x-i)*4\n if y==t:\n print("Yes")\n exit()\nprint("No")']
['Wrong Answer', 'Accepted']
['s363825991', 's684226438']
[9100.0, 9104.0]
[28.0, 28.0]
[92, 116]
p02640
u275392848
2,000
1,048,576
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.
['n,m=map(int,input().split())\n\nif m/4<=n<=m/2 and n%2==0:\n print("Yes")\nelse:\n print("No")', 'n,m=map(int,input().split())\n\nif m/4<=n<=m/2 and m%2==0:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s065324544', 's182891472']
[9164.0, 9156.0]
[22.0, 20.0]
[91, 91]
p02640
u275726913
2,000
1,048,576
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.
["x,y=map(int,input().split())\nans='No'\nfor i in range(x+1):\n j=x-i\n if 2*x+4*j==y:\n ans='Yes'\nprint(ans)", "x,y=map(int,input().split())\nans='No'\nfor a in range(x+1):\n j=x-a\n if 2*a+4*j==y:\n ans='Yes'\nprint(ans)"]
['Wrong Answer', 'Accepted']
['s524692417', 's482116041']
[8900.0, 9160.0]
[30.0, 25.0]
[116, 116]
p02640
u279570066
2,000
1,048,576
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.
["X,Y =input().split()\n\nif (Y % 2 == 0) and (4*X >= Y >=2*X):\n print('Yes')\n\nelse:\n print('No')", "X,Y =map(int,input().split())\n\nif (Y % 2 == 0) and (4*X >= Y >=2*X):\n print('Yes')\n\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s483267742', 's007292130']
[9088.0, 9160.0]
[32.0, 28.0]
[99, 108]
p02640
u279670936
2,000
1,048,576
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.
["n, l = list(map(int, input().split()))\n#print(n,l)\nminl, maxl = n * 2, n * 4\ndef fn(): return 'no' if l & 1 == 1 or l not in [i for i in range(minl, maxl+1, 2)] else 'yes'\nprint(fn())", "n, l = list(map(int, input().split()))\nminl, maxl = n * 2, n * 4\ndef fn(): return 'No' if l & 1 == 1 or l not in [i for i in range(minl, maxl+1, 2)] else 'Yes'\nprint(fn())\n"]
['Wrong Answer', 'Accepted']
['s820911145', 's687981732']
[9028.0, 9112.0]
[29.0, 27.0]
[183, 172]
p02640
u281745878
2,000
1,048,576
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.
['X,Y = map(int,input().split())\nFlag = False\nfor i in range(X+1):\n if i * 2 + 4 * (X - i + 1) == Y:\n Flag = True\n break\n\nif Flag == True:\n print("Yes")\nelse:\n print("No")\n', 'X,Y = map(int,input().split())\nFlag = False\nfor i in range(X+1):\n if i * 2 + 4 * (X - i) == Y:\n Flag = True\n break\n\nif Flag == True:\n print("Yes")\nelse:\n print("No")\n']
['Wrong Answer', 'Accepted']
['s536287774', 's118610928']
[9084.0, 9084.0]
[35.0, 26.0]
[193, 189]
p02640
u283683979
2,000
1,048,576
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.
["q=0\nfor a in range(x+1):\n s=0\n s+=a*2\n s+=(x-a)*4\n if s==y:\n q=1\n break\n\nif q==0:\n print('No')\nelse:\n print('Yes')", "x,y=map(int,input('').split(' '))\nq=0\nfor a in range(x+1):\n s=0\n s+=a*2\n s+=(x-a)*4\n if s==y:\n q=1\n break\n\nif q==0:\n print('No')\nelse:\n print('Yes')"]
['Runtime Error', 'Accepted']
['s477410022', 's293317419']
[9132.0, 9184.0]
[22.0, 24.0]
[146, 180]
p02640
u284363684
2,000
1,048,576
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.
['# input\nX, Y = map(int, input().split())\n\n\nif Y in set([sum(p) for p in set(product([2, 4], repeat=X))]):\n print("Yes")\nelse:\n print("No")', '# input\nX, Y = map(int, input().split())\n\n\nif Y < 2 * X or Y > 4 * X or abs(Y - 2 * X) % 2 != 0:\n print("No")\nelse:\n print("Yes")']
['Runtime Error', 'Accepted']
['s897444233', 's616030245']
[9140.0, 9172.0]
[24.0, 26.0]
[151, 142]
p02640
u285372827
2,000
1,048,576
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.
['a,b = map(int,input().split())\nexist_flg = False\nfor kame in range(a+1):\n tsuru = a - kame\n if (kame*4+tsuru*2)==b:\n exist_flg = True\n break\nif exist_flg:\n print("YES")\nelse:\n print("NO")', 'a,b = map(int,input().split())\nexist_flg = False\nfor kame in range(a+1):\n tsuru = a - kame\n if (kame*4+tsuru*2)==b:\n exist_flg = True\n break\nif exist_flg:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s935073846', 's171177942']
[9176.0, 9168.0]
[19.0, 24.0]
[197, 197]
p02640
u285436211
2,000
1,048,576
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.
['x,y=map(int,input().split())\nans="No"\nif a in range(x+1):\n b=x-a\n a*2+b*4==y:\n ans="Yes"\nprint(ans)', 'x,y=map(int,input().split())\nans="No"\nfor a in range(x+1):\n b=x-a\n if 2*a+4*b==y:\n ans="Yes"\nprint(ans)\n ']
['Runtime Error', 'Accepted']
['s889471554', 's052436534']
[8868.0, 9148.0]
[25.0, 26.0]
[104, 111]
p02640
u285497176
2,000
1,048,576
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.
['x,y = map(int,input().split())\n\nl = []\nc = 2 * x\nl.append(c)\nfor nn in range(x):\n c += 2\n l.append(c)\nprint(l)\n\nflag = False\nfor ll in l:\n if ll == y:\n print("Yes")\n flag = False\n break\n\n else:\n flag = True\n\nif flag:\n print("No")', 'x,y = map(int,input().split())\n\nl = []\nc = 2 * x\nl.append(c)\nfor nn in range(x):\n c += 2\n l.append(c)\n\nflag = False\nfor ll in l:\n if ll == y:\n print("Yes")\n flag = False\n break\n\n else:\n flag = True\n\nif flag:\n print("No")']
['Wrong Answer', 'Accepted']
['s345714204', 's686445856']
[9120.0, 9184.0]
[27.0, 30.0]
[272, 263]
p02640
u285833393
2,000
1,048,576
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.
['X, Y = map(int, input().split())\n\nfor i in range(101):\n for j in range(101):\n if i + j == X and 2 * i + 4 * j == Y:\n print("YES")\n exit()\n\nprint("NO")', 'X, Y = map(int, input().split())\n\nfor i in range(101):\n for j in range(101):\n if i + j == X and 2 * i + 4 * j == Y:\n print("Yes")\n exit()\n\nprint("No")']
['Wrong Answer', 'Accepted']
['s453510898', 's743511500']
[9172.0, 9172.0]
[25.0, 23.0]
[182, 182]
p02640
u286422818
2,000
1,048,576
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.
['X, Y = map(int, input().split())\n\nb = (Y - 2*X)/2\na = X - b\nprint(a, b)\n\nis_int = (a.is_integer() and b.is_integer())\nis_positive = (a >= 0 and b >= 0)\nif is_int and is_positive and (a + b) == X and (2*a + 4*b) == Y:\n print("Yes")\nelse:\n print("No")\n', 'X, Y = map(int, input().split())\n\nb = (Y - 2*X)/2\na = X - b\n\nis_int = (a.is_integer() and b.is_integer())\nis_positive = (a >= 0 and b >= 0)\nif is_int and is_positive and (a + b) == X and (2*a + 4*b) == Y:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s305952691', 's215925172']
[9180.0, 9120.0]
[27.0, 32.0]
[256, 243]
p02640
u287219926
2,000
1,048,576
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.
['import sys\ni = 0\nx, y = input().split()\nx, y = int(x), int(y)\n\nfor count in range(0, x):\n i += 4\n\nfor count in range(0, x):\n if i > y:\n i -= 2\n\n if i == y:\n print("yes")\n sys.exit()\n\nprint("no")', 'import sys\ni = 0\nx, y = input().split()\nx, y = int(x), int(y)\n\nfor count in range(0, x):\n i += 4\n\nfor count in range(0, x):\n if i > y:\n i -= 2\n\n if i == y:\n print("Yes")\n sys.exit()\n\nprint("No")']
['Wrong Answer', 'Accepted']
['s959874118', 's797536708']
[9180.0, 9140.0]
[29.0, 25.0]
[225, 225]
p02640
u287660527
2,000
1,048,576
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.
["x,y = map(intinput()split())\na = 4x-y\nif a/2 = a%2:\n print('Yes')\nelse:\n print('No')", "x,y = map(int,input().split())\na = 4 * x - y\nif a/2 == a%2:\n print('Yes')\nelse:\n print('No')", "x,y = map(int,input().split())\na = 4 * x - y\nb = y - 2*x\nif a/2 == a//2 and a >= 0 and b/2 == b//2 and b >= 0:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Wrong Answer', 'Accepted']
['s157539793', 's725170985', 's342019334']
[8816.0, 9100.0, 9168.0]
[22.0, 29.0, 33.0]
[86, 94, 145]
p02640
u288881685
2,000
1,048,576
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.
['x,y=map(int,input().split())\nif 2*x<=y and y<=4*x and y&2=0:\n print("Yes")\nelse:\n print("No")', 'x,y=map(int,input().split())\nif 2*x<=y and y<=4*x and y%2==0:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s131104675', 's845524959']
[8800.0, 9152.0]
[20.0, 27.0]
[95, 96]
p02640
u291988695
2,000
1,048,576
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.
['x,y=map(int,input().split())\n\nif y<2*x or 4*x>y:\n print("No")\nelse:\n print("Yes")', 'x,y=map(int,input().split())\n\nif y<2*x or 4*x<y or y%2==1:\n print("No")\nelse:\n print("Yes")\n']
['Wrong Answer', 'Accepted']
['s939123084', 's992552750']
[9188.0, 9156.0]
[22.0, 25.0]
[95, 106]
p02640
u293215208
2,000
1,048,576
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.
["x,y = map(int, input().split()))\n\nymax = 4 * x\nymin = 2 * x\n\nif y >= ymin and y <= ymax and y % 2 == 0:\n print('Yes')\nelse:\n print('No')", "x, y = map(int, input().split())\n\nymax = 4 * x\nymin = 2 * x\n\nif y >= ymin and y <= ymax and y % 2 == 0:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s168990495', 's306329849']
[8936.0, 9116.0]
[24.0, 27.0]
[138, 138]
p02640
u295120316
2,000
1,048,576
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.
['x, y = map(int, input().split())\nfor i in range(x):\n if (x-i)*4 + i*2 == y:\n print("YES")\n exit()\n\nprint(\'NO\')', 'x, y = map(int, input().split())\nfor i in range(x+1):\n if (x-i)*4 + i*2 == y:\n print("YES")\n exit()\n\nprint(\'NO\')', 'x, y = map(int, input().split())\nfor i in range(x+1):\n if (x-i)*4 + i*2 == y:\n print("Yes")\n exit()\n\nprint(\'No\')']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s049649265', 's427050863', 's593954222']
[9120.0, 9104.0, 9164.0]
[24.0, 21.0, 22.0]
[127, 129, 129]
p02640
u299599133
2,000
1,048,576
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.
["X , Y = map(int, input().split())\nval = X * 2\nfor i in range(X + 1):\n val += i * 2\n if val == Y:\n print('YES')\n break\nelse:\n print('NO')", "X , Y = map(int, input().split())\nval = X * 2 - 2\nfor i in range(X + 1):\n val += 2\n if val == Y:\n print('Yes')\n break\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s076654227', 's521938356']
[9164.0, 9164.0]
[23.0, 23.0]
[159, 159]
p02640
u302707263
2,000
1,048,576
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.
['import sys\nanimals, legs = [int(i) for i in input().split()]\n\ncranes = 2\nturtle = 4\n\nfor i in range(1, animals + 1):\n for j in range(1, animals + 1):\n number = (2*i) + (4*j)\n if i + j == animals and number == legs:\n print("YES")\n sys.exit()\n\nprint("NO")', 'import sys\nanimals, legs = [int(i) for i in input().split()]\n\ncranes = 2\nturtle = 4\n\nfor i in range(0, animals + 1):\n for j in range(0, animals + 1):\n number = (2*i) + (4*j)\n if i + j == animals and number == legs:\n print("Yes")\n sys.exit()\n\nprint("No")']
['Wrong Answer', 'Accepted']
['s910518159', 's911010817']
[9196.0, 9176.0]
[22.0, 21.0]
[292, 292]
p02640
u303949907
2,000
1,048,576
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.
['x, y = map(int, input().split())\nnum = (y - (2 * x))/ 2\nnum_2 = int(num)\nprint(num)\nprint(num_2)\nif (4 * x) > y and num_2 -num == 0:\n print("Yes")\nelse:\n print("No")', 'x, y = map(int, input().split())\nnum = (y - (2 * x))/ 2\nnum_2 = int(num)\nif (4 * x) >= y and (2 * x) <= y and num_2 -num == 0:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s091279822', 's315899062']
[9180.0, 9172.0]
[20.0, 24.0]
[171, 165]
p02640
u305349402
2,000
1,048,576
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.
['X,Y = list(map(int,input().split()))\nx = 2*X-Y/2\ny = Y/2 - X\nif x >= 0 and y >= 0 and (type(x) is int) and (type(y) is int):\n print("Yes")\nelse:\n print("No")', 'X,Y = list(map(int,input().split()))\nx = 2*X-Y/2\ny = Y/2 - X\nif x > 0 and y > 0 and (type(x) is int) and (type(y) is int):\n print("Yes")\nelse:\n print("No")', 'X,Y = list(map(int,input().split()))\nx = 2*X-Y/2\ny = Y/2 - X\nif x >= 0 and y >= 0 and (Y%2 == 0):\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s095775524', 's577599460', 's625682707']
[9180.0, 9176.0, 9176.0]
[21.0, 21.0, 23.0]
[160, 158, 132]
p02640
u310035060
2,000
1,048,576
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.
['x,y = map(int,input().split())\nif y%2!=0:\n print("No")\nkame=(y//2)-x\ntsuru = (-y//2)+2x\nif kame + tsuru == x:\n print("Yes")\nelse:\n print("No")', 'def abc2(x,y):\n if y%2!=0:\n return print("No")\n kame = (y//2)-x\n if (kame>=0)&(kame<=x):\n return print("Yes")\n else:\n return print("No")\nx,y = map(int,input().split())\nabs2(x,y)', "X, Y = map(int, input().split())\nans = 'No'\n for a in range(X + 1):\n b = X - a\n if 2 * a + 4 * b == Y:\n ans = 'Yes'\nprint(ans)", "X, Y = map(int, input().split())\nans = 'No'\n for a in range(X + 1):\n b = X - a\n if 2 * a + 4 * b == Y:\n ans = 'Yes'\nprint(ans)", 'x,y = map(int,input().split())\nkame=(y//2)-x\nif y%2!=0:\n print("No")\nelif (kame>=0)&(kame<=x):\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s316769429', 's611269914', 's790707056', 's843787642', 's408125637']
[8892.0, 9112.0, 9012.0, 8848.0, 9072.0]
[25.0, 25.0, 25.0, 20.0, 27.0]
[151, 210, 150, 154, 137]
p02640
u310337637
2,000
1,048,576
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.
['x, y = map(int, input().split())\n\nno_flag = 0\n\nif y - (4 * x) == 0:\n print("Yes")\nelif y - (2 * x) == 0:\n print("Yes")\nelse:\n for cnt in range(x+1):\n if y >= 4 and y - (2 * (x-(cnt))) != 0:\n y -= 4\n elif y >= 2:\n y -= 2\n\n if y == 0 and cnt == x-1:\n no_flag = 0\n else:\n no_flag = 1\n\n if no_flag == 0:\n print("Yes")\n elif no_flag == 1:\n print("No")\n', 'x, y = map(int, input().split())\n\nno_flag = -1\n\nif y - (4 * x) == 0:\n print("Yes")\nelif y - (2 * x) == 0:\n print("Yes")\nelse:\n for cnt in range(x):\n if y >= 4 and y - (2 * (x-(cnt-1))) != 0:\n y -= 4\n elif y >= 2:\n y -= 2\n\n if y == 0 and cnt == x-1:\n no_flag = 0\n else:\n no_flag = 1\n\n if no_flag == 0:\n print("Yes")\n elif no_flag == 1:\n print("No")\n', 'x, y = map(int, input().split())\n\nno_flag = 0\n\nif y - (4 * x) == 0:\n print("Yes")\nelif y - (2 * x) == 0:\n print("Yes")\nelse:\n for cnt in range(x):\n if y >= 4 and y - (2 * (x-(cnt))) != 0:\n y -= 4\n elif y >= 2:\n y -= 2\n\n if y == 0 and cnt == x:\n no_flag = 0\n else:\n no_flag = 1\n\n if no_flag == 0:\n print("Yes")\n elif no_flag == 1:\n print("No")\n', 'x, y = map(int, input().split())\n\nno_flag = -1\n\nif y - (4 * x) == 0:\n print("Yes")\nelif y - (2 * x) == 0:\n print("Yes")\nelse:\n for cnt in range(x):\n if y >= 4 and y - (2 * (x-(cnt))) != 0:\n y -= 4\n elif y >= 2:\n y -= 2\n\n if y == 0 and cnt == x-1:\n no_flag = 0\n elif y == 0 and cnt != x-1:\n no_flag = 1\n break\n else:\n no_flag = 1\n\n if no_flag == 0:\n print("Yes")\n elif no_flag == 1:\n print("No")\n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s699871494', 's713779831', 's731031644', 's375429355']
[9140.0, 9108.0, 9204.0, 9120.0]
[26.0, 28.0, 24.0, 29.0]
[448, 449, 444, 525]
p02640
u312482829
2,000
1,048,576
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.
["import sys\n\nx, y = map(int, input().split())\n\n\nfor a in range(1, x + 1):\n if y == 4 * x - 2 * a:\n print('YES')\n sys.exit()\n \nprint('NO')", "import sys\n\nx, y = map(int, input().split())\n\n\nfor a in range(x + 1):\n if y == 4 * x - 2 * a:\n print('Yes')\n sys.exit()\n \nprint('No')"]
['Wrong Answer', 'Accepted']
['s066974103', 's927748782']
[9168.0, 9168.0]
[21.0, 24.0]
[175, 172]
p02640
u315927817
2,000
1,048,576
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.
["X, Y = map(int, input().split())\n2 ans = 'No'\n3 for a in range(X + 1):\n4 b = X - a\n5 if 2 * a + 4 * b == Y:\n6 ans = 'Yes'\n7 print(ans)\n", 'input = input()\n \nnums = input.split(" ")\n \nanimals = int(nums[0])\nlegs = int(nums[1])\n \nturu = (4*animals -legs)/2.0\nkame = (legs-2*animals)/2.0\n \nif turu.is_integer() and kame.is_integer() and turu>=0 and kame>=0:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s677870563', 's313518941']
[9024.0, 9116.0]
[28.0, 26.0]
[135, 254]
p02640
u316733945
2,000
1,048,576
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.
['x, y = map(int, input().split())\n\nj = y/2 - x\ni = x - y/2\n\nif (j == abs(int(j))) and (i == abs(int(i))):\n print("Yes")\nelse:\n print("No")', 'x, y = map(int, input().split())\n\nj = y/2 - x\ni = 2*x - y/2\n\nif (j == abs(int(j))) and (i == abs(int(i))):\n print("Yes")\nelse:\n print("No")\n']
['Wrong Answer', 'Accepted']
['s924642133', 's459849200']
[9116.0, 9172.0]
[24.0, 21.0]
[143, 146]
p02640
u320763652
2,000
1,048,576
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.
['x,y = map(int, input().split())\nprint( (4*x - y) / 2)\nif (4*x - y) / 2 >= 0 and (4*x - y) % 2 == 0:\n print("Yes")\nelse:\n print("No")\n', 'x,y = map(int, input().split())\n\nif (4*x - y) / 2 >= 0 and (4*x - y) % 2 == 0 and (4*x - y) / 2 <= x:\n print("Yes")\nelse:\n print("No")\n\n']
['Wrong Answer', 'Accepted']
['s743946390', 's017112241']
[9164.0, 9188.0]
[21.0, 23.0]
[141, 144]
p02640
u321065001
2,000
1,048,576
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.
['X,Y = map(int, input().split())\n\nb=(Y-2*X)/2\na=X-b\n\nif isinstance(a, int) and isinstance(b, int) and a>0 and b>0 :\n print("Yes")\nelse:\n print("No")\n', 'X,Y = map(int, input().split())\n\nb=(Y-2*X)/2\na=X-b\n\nif a.is_integer() and b.is_integer() and a>=0 and b>=0:\n print("Yes")\nelse:\n print("No")\n']
['Wrong Answer', 'Accepted']
['s798524831', 's137616194']
[9092.0, 9092.0]
[29.0, 28.0]
[154, 147]
p02640
u321881571
2,000
1,048,576
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.
['x,y = map(int,input().split())\nfor i in range (0,x+1):\n if y==2*i+4*(x-i):\n print(Yes)\n else:\n if i==x:\n print(No)', "x,y = map(int,input().split())\nans='No'\nfor i in range(x+1):\n if y == 2*i+4*(x-i):\n ans='Yes'\nprint(ans)"]
['Runtime Error', 'Accepted']
['s841686053', 's991018177']
[9128.0, 9172.0]
[19.0, 24.0]
[145, 114]
p02640
u322171361
2,000
1,048,576
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.
['x,y=input().split()\nif y%2==1 or x*2>y or x*4<y:\n a="No"\nelse:\n a="Yes"\nprint(a)', 'x,y=input().split()\nx=int(x)\ny=int(y)\nif y%2==1 or x*2>y or x*4<y:\n a="No"\nelse:\n a="Yes"\nprint(a)\n']
['Runtime Error', 'Accepted']
['s038261038', 's433858643']
[9096.0, 9188.0]
[21.0, 22.0]
[82, 101]
p02640
u323859575
2,000
1,048,576
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.
['x, y = map(int, input().split(" "))\n\nprint(y%2)\nif y%2 == 1:\n print(\'No\')\nelif 4 * x < y:\n print(\'No\')\nelif 2 * x > y:\n print(\'No\')\nelse:\n for i in range(0,x+1):\n if 2 * i + 4 * (x-i) == y:\n print(\'Yes\')\n break\n else:\n print(\'No\')\n \n', 'x, y = map(int, input().split(" "))\n\nif y%2 == 1:\n print(\'No\')\nelif 4 * x < y:\n print(\'No\')\nelif 2 * x > y:\n print(\'No\')\nelse:\n for i in range(0,x+1):\n # print("i:{}".format(i))\n if 2 * i + 4 * (x-i) == y:\n print(\'Yes\')\n break\n else:\n print(\'No\')\n \n']
['Wrong Answer', 'Accepted']
['s406503620', 's450703410']
[9168.0, 9180.0]
[24.0, 25.0]
[291, 314]
p02640
u324090406
2,000
1,048,576
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.
['x ,y= list(map(int, input().split()))\n\nif y >= 2*x and y<= 4*x and y% 2==0:\n print("YES")\nelse:\n print("NO")', 'x ,y= list(map(int, input().split()))\n\nif y >= 2*x and y<= 4*x and y% 2==0:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s002816284', 's232479313']
[9164.0, 9096.0]
[23.0, 23.0]
[114, 114]
p02640
u326278153
2,000
1,048,576
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.
["if y % 2 == 1:\n print('No')\nelse:\n for i in range(x + 1):\n foot = i * 2 + (x - i) * 4\n if foot == y:\n print('Yes')\n break\n\nprint('No')\n", "if y % 2 == 1:\n print('No')\nelse:\n for i in range(x + 1):\n foot = i * 2 + (x - i) * 4\n if foot == y:\n print('Yes')\n exit()\n print('No')", "x, y = map(int, input().split())\nif y % 2 == 1:\n print('No')\nelse:\n for i in range(x + 1):\n foot = i * 2 + (x - i) * 4\n if foot == y:\n print('Yes')\n exit()\n print('No')"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s450431345', 's464916656', 's873069575']
[9076.0, 8988.0, 9120.0]
[21.0, 23.0, 32.0]
[177, 180, 213]
p02640
u326408598
2,000
1,048,576
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.
["n,l = map(int,input().split())\nif l%2 != 0:\n print('NO')\nelif l<=n*4:\n print('YES')\nelse:\n print('NO')\n", "n,l = map(int,input().split())\nif l%2 != 0:\n print('No')\nelif l>=n*2 and l<=n*4:\n print('Yes')\nelse:\n print('No')\n"]
['Wrong Answer', 'Accepted']
['s444415067', 's018289304']
[9124.0, 9100.0]
[28.0, 30.0]
[112, 123]
p02640
u329962837
2,000
1,048,576
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.
['\nX,Y = map(int,input().split())\na = (4 * X - Y) / 2\nif a.is_integer() and 0 <= a:\n print("YES")\nelse:\n print("NO")', '\nX,Y = map(int,input().split())\na = (4 * X - Y) / 2\nif a.is_integer() and 0 <= a <= X:\n print("YES")\nelse:\n print("NO")', '\nX,Y = map(int,input().split())\nans = "No"\nfor a in range(X+1):\n b = X - a\n f = 2 * a + 4 * b\n if f == Y:\n ans = "Yes"\nprint(ans)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s382579614', 's630322792', 's989007864']
[9176.0, 9160.0, 9132.0]
[30.0, 27.0, 24.0]
[260, 265, 222]
p02640
u330799501
2,000
1,048,576
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.
['#n = int(input())\nx, y = map(int, input().split())\n#l = list(map(int, input().split()))\n#s = input()\n\nif y % 2 != 0:\n print("No")\n exit()\n\nif (y//x >=2 and y//x <=4):\n if (y%x == 0):\n print("Yes")\n else:\n print("No")\n\nelse:\n print("No")\n', '#n = int(input())\nx, y = map(int, input().split())\n#l = list(map(int, input().split()))\n#s = input()\nans = "No"\nfor i in range(x+1):\n if 2*i+4*x == y:\n ans = "Yes"\n\nprint(ans)\n', '#n = int(input())\nx, y = map(int, input().split())\n#l = list(map(int, input().split()))\n#s = input()\nans = "No"\nfor i in range(x+1):\n if 2*i+4*(x-i) == y:\n ans = "Yes"\n\nprint(ans)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s161061214', 's563483897', 's571297025']
[9104.0, 9092.0, 9012.0]
[27.0, 25.0, 25.0]
[266, 186, 190]
p02640
u335829917
2,000
1,048,576
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.
["x,y = map(int,input().split())\nif y // 2 == 0 and y > 4*x and y < 2*x:\n ans=('Yes')\nelse :\n ans = ('No')\nprint(ans)\n \n\n", "x,y = map(int,input().split())\nif y % 2 == 0 and y <= 4*x and y >= 2*x:\n ans=('Yes')\nelse :\n ans = ('No')\nprint(ans)"]
['Wrong Answer', 'Accepted']
['s498337299', 's943676414']
[9156.0, 9164.0]
[28.0, 27.0]
[134, 126]
p02640
u338597441
2,000
1,048,576
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.
['import sys\nx,y=map(int,input().split())\n\nfor i in range(1,x+1):\n \tif y>50: \n print("No")\n break\n if y==2*(x-i)+4*i:\n print("Yes")\n break\n elif y==2*x+4*(x-i):\n print("Yes")\n break\n else:\n print("No")\n break\n', 'x,y=map(int,input().split())\n\nfor i in range(0,x+1):\n if y>50:\n print("No")\n break\n if y==2*(x-i)+4*i:\n print("Yes")\n break\n elif y==2*x+4*(x-i):\n print("Yes")\n break\nprint("No")', 'x,y=map(int,input().split())\nc=0\nfor i in range(0,x+1):\n if y>50:\n c+=1\n print("No")\n break\n if y==2*(x-i)+4*i:\n c+=1\n print("Yes")\n break\n elif y==2*x+4*(x-i):\n c+=1\n print("Yes")\n break\nif c==0\n print("No")', 'x,y=map(int,input().split())\n\nfor i in range(0,x+1):\n if y>50:\n print("No")\n break\n if y==2*(x-i)+4*i:\n print("Yes")\n break\n elif y==2*x+4*(x-i):\n print("Yes")\n break\n else:\n print("No")\n break', 'x,y=map(int,input().split())\nc=0\nfor i in range(0,x+1):\n if y==2*(x-i)+4*i:\n c+=1\n print("Yes")\n break\n elif y==2*i+4*(x-i):\n c+=1\n print("Yes")\n break\nif c==0:\n print("No")']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s213863432', 's308030502', 's337441332', 's817041669', 's346816415']
[9020.0, 9176.0, 8984.0, 9188.0, 9188.0]
[23.0, 20.0, 21.0, 23.0, 21.0]
[269, 229, 283, 261, 224]
p02640
u338904752
2,000
1,048,576
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.
["X, Y = map(int, input().split())\n\nfor turu in range(101):\n for kame in range(101):\n if turu + kame == X and 2 * turu + 4 * kame == Y:\n print('YES')\n exit(0)\n\nprint('NO')\n", "X, Y = map(int, input().split())\n\nfor turu in range(101):\n for kame in range(101):\n if turu + kame == X and 2 * turu + 4 * kame == Y:\n print('Yes')\n exit(0)\n\nprint('No')\n"]
['Wrong Answer', 'Accepted']
['s658252394', 's070017278']
[9104.0, 9160.0]
[21.0, 22.0]
[202, 202]
p02640
u340064601
2,000
1,048,576
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.
["x,y=map(int,input().split())\nprint('YES'if y%2==0 and x*2<=y<=x*4)", "x,y=map(int,input().split())\nprint('Yes'if y%2==0 and x*2<=y<=x*4else'No')"]
['Runtime Error', 'Accepted']
['s059884440', 's498490737']
[8848.0, 9100.0]
[25.0, 31.0]
[66, 74]
p02640
u341782514
2,000
1,048,576
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.
['X = int(input())\nY = int(input())\nflag =0\nfor crane in range(X + 1):\n if (Y - crane*2 - (X-crane)*4 ) == 0:\n print("Yes")\n flag =1\n break\nif flag == 0:\n print("No")', 'def is_integer(n):\n try:\n float(n)\n except ValueError:\n return False\n else:\n return float(n).is_integer()\n\n\nX = int(input())\nY = int(input())\nTurtle = (Y - 2*X ) / 2\nCrane = X - Turtle\nif Turtle >= 0 and Crane >= 0 and is_integer(Turtle) and is_integer(Crane):\n print("Yes")\nelse:\n print("No")', 'X = int(input())\nY = int(input())\nif (Y-2*X) % 2 == 0:\n print("Yes")\nelse:\n print("No")', 'def is_integer(n):\n try:\n float(n)\n except ValueError:\n return False\n else:\n return float(n).is_integer()\n\n\nX, Y = list(map(int, input().split()))\nTurtle = (Y - 2*X ) / 2\nCrane = X - Turtle\nif Turtle >= 0 and Crane >= 0 and is_integer(Turtle) and is_integer(Crane):\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s259234018', 's353305360', 's916612867', 's996208515']
[9176.0, 9120.0, 9136.0, 9184.0]
[27.0, 29.0, 20.0, 27.0]
[177, 329, 93, 334]
p02640
u342747506
2,000
1,048,576
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.
['n , total = map(int,input().split())\n\nif total % 2 == 0 :\n if 2*n <= total and 4*n >= total:\n print("yes")\n else:\n print("No")\nelse:\n print("No")', 'import sys\n\nn , total = map(int,input().split())\nt = 0\nk = 0\n\nfor t in range(n + 1):\n for k in range(n + 1):\n x = t + k\n if x == n:\n if 2*t + 4*k == total:\n print("Yes")\n sys.exit()\nprint("No")\n ']
['Wrong Answer', 'Accepted']
['s223114659', 's056634607']
[9072.0, 9180.0]
[23.0, 22.0]
[168, 264]
p02640
u343021464
2,000
1,048,576
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.
['x, y = map(int, input().split())\n\nflag = False\nfor turu in range(101):\n for kame in range(101):\n if turu + kame == x and 2 * turu + 4 * kame == y:\n flag = True\n break\nprint(flag)', 'x, y = map(int, input().split())\n\nflag = False\nfor turu in range(101):\n for kame in range(101):\n if turu + kame == x and 2 * turu + 4 * kame == y:\n flag = True\n break\nprint("Yes" if flag == True else "No")']
['Wrong Answer', 'Accepted']
['s577112662', 's632203472']
[9168.0, 9204.0]
[24.0, 26.0]
[210, 237]
p02640
u345577588
2,000
1,048,576
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.
['x,y=map(int,input().split())\nif y>=2*x and y<=4*x and y%6==0:\n print("YES")\nelse:\n print(\'NO\')', 'x,y=map(int,input().split())\nif y>=2*x and y<=4*x and y%2==0:\n print("YES")\nelse:\n print(\'NO\')', 'x,y=map(int,input().split())\nif y>=2*x and y<=4*x and y%2==0:\n print("Yes")\nelse:\n print(\'No\')']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s192046668', 's725104590', 's431730340']
[9108.0, 9168.0, 9000.0]
[26.0, 27.0, 28.0]
[100, 100, 100]
p02640
u346675525
2,000
1,048,576
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.
["x,y = map(int, input().split())\n\n\nif 1 <= x <= 100 and 1 <= y <= 100:\n for a in range(0, 100, 1):\n if ( 2 * (x-a) + 4 * a == y and a <= x ):\n print('yes')\n exit()\n\n print('no')", "x,y = map(int, input().split())\n\n\nif 1 <= x <= 100 and 1 <= y <= 100:\n for a in range(0, 100, 1):\n if ( 2 * (x-a) + 4 * a == y and a < x ):\n print('yes')\n exit()\n\n print('no')", "x,y = map(int, input().split())\n\n\nif 1 <= x <= 100 and 1 <= y <= 100:\n for a in range(0, 100, 1):\n if ( 2 * (x-a) + 4 * a == y and a < x ):\n print('yes')\n exit()\n\n print('no')", "x,y = map(int, input().split())\n\n\nif 0 <= x <= 100 and 0 <= y <= 100:\n for a in range(0, 100, 1):\n if ( 2 * (x-a) + 4 * a == y and a < x ):\n print('yes')\n exit()\n\n print('no')", "x,y = map(int, input().split())\n \n\nif 1 <= x <= 100 and 1 <= y <= 100:\n for a in range(0, 100, 1):\n if ( 2 * (x-a) + 4 * a == y and a <= x ):\n print('yes')\n exit()\n\n print('no')\nelse:\n print('no')", "x,y = map(int, input().split())\n \n\nif 1 <= x <= 100 and 1 <= y <= 100:\n for a in range(0, 100, 1):\n if ( 2 * (x-a) + 4 * a == y and a <= x ):\n print('Yes')\n exit()\n\n print('No')\nelse:\n print('No')"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s120337879', 's398392268', 's471286544', 's519095764', 's652723828', 's197715558']
[9176.0, 9108.0, 9180.0, 9176.0, 9188.0, 9184.0]
[21.0, 22.0, 23.0, 23.0, 24.0, 23.0]
[192, 191, 191, 191, 214, 214]
p02640
u349856178
2,000
1,048,576
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.
['x, y = map(int, input().split())\nc = 2\nt = 4\nif y%2 != 0:\n print("No")\nelse:\n while x != 0:\n if y%2 == 0:\n y -= c\n x -= 1\n continue\n if y%4 == 0:\n y -= t\n x -= 1\n continue\n if y == 0:\n print("Yes")\n else:\n print("No")\n \n', 'x, y = map(int, input().split())\n\nchk = False\n\nfor a in range(x+1):\n b = x-a\n d = 2*a + 4*b\n if d == y:\n chk = True\n break\n \nif chk:\n print("Yes")\nelse:\n print("No")\n \n']
['Wrong Answer', 'Accepted']
['s352169132', 's268368190']
[9184.0, 9128.0]
[23.0, 24.0]
[329, 203]
p02640
u351480677
2,000
1,048,576
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.
['x,y = map(int,input().split())\ncnt = 0\nif y<(2*x):\n cnt+=1\nif y>(4*x):\n cnt+=1\nif (y-(2*x))%2 != 0:\n cnt+=1\nelse:\n print("No")\nif cnt==0:\n print("Yes")', 'x,y = map(int,input().split())\ncnt = 0\nif y<(2*x):\n cnt+=1\nif y>(4*x):\n cnt+=1\nif (y-(2*x))%2 != 0:\n cnt+=1\nif cnt==0:\n print("Yes")\nif cnt!= 0:\n print("No")']
['Wrong Answer', 'Accepted']
['s065674578', 's475198789']
[9184.0, 9116.0]
[22.0, 23.0]
[166, 172]
p02640
u353710288
2,000
1,048,576
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.
['import itertools\nx,y = list(map(int,input().split()))\n\nif x == 1:\n if y == 2:\n print("Yes")\n elif y == 4:\n print("Yes")\n else:\n print("No")\nelse: \n lists = [2]*(x-1) + [4]\n if sum([4]*x) > y:\n print("No")\n else:\n lists = itertools.permutations(lists)\n check = True\n for i in lists:\n if sum(i) == y:\n print("Yes")\n check = False\n break\n if check:\n print("No")\n', 'x,y = list(map(int,input().split()))\n\nif x == 1:\n if (y == 2) or (y == 4):\n print("Yes")\n else:\n print("No")\n \n\nelif x > 50:\n print("No")\n \n\nelse: \n check = True\n for i in range(x+1):\n if sum([2]*(i) + [4]*(50-i)) == y:\n print("Yes")\n check=False\n break\n if check:\n print("No")\n', 'import itertools\nx,y = list(map(int,input().split()))\n\nif x == 1:\n if y == 2:\n print("Yes")\n elif y == 4:\n print("Yes")\n else:\n print("No")\n \n\nelif x > 50:\n print("No")\n\nelse: \n lists = [2] + [4]\n lists = itertools.product(lists, repeat=50)\n check = True\n for i in lists:\n if sum(i) == y:\n print("Yes")\n check = False\n break\n if check:\n print("No")\n', 'import itertools\nx,y = list(map(int,input().split()))\n\nif x == 1:\n if y == 2:\n print("Yes")\n elif y == 4:\n print("Yes")\n else:\n print("No")\n \n\nelif x > 50:\n print("No")\n\nelse: \n check = True\n for i in range(x):\n if sum([2]*(i) + [4]*(50-i)) == y:\n print("Yes")\n check=False\n break\n if check:\n print("No")\n', 'x,y = list(map(int,input().split()))\n\nif x == 1:\n if (y == 2) or (y == 4):\n print("Yes")\n else:\n print("No")\n \n\nelif x > 50:\n print("No")\n \n\nelse: \n check = True\n for i in range(x+1):\n if sum([2]*(i) + [4]*(x-i)) == y:\n print("Yes")\n check=False\n break\n if check:\n print("No")\n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s177281632', 's222489104', 's416932281', 's965219821', 's451102012']
[8936.0, 9188.0, 9120.0, 9188.0, 9216.0]
[2206.0, 24.0, 2206.0, 26.0, 29.0]
[422, 391, 467, 421, 390]
p02640
u353919145
2,000
1,048,576
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.
['#Take the value of X\n#Take the value of Y\n\n\nX, Y = map(int, input().split(" "))\n\nC = (Y-4*X)/-2\n\nT = X - ((Y-4*X)/-2)\n\ntotal = int(T + C)\n\nif (T<0) or (C<0):\n print("No")\nelif (T%1 != 0) or (C%1 != 0):\n print("No")\nelif (T+C) == X and (4*T + 2*C) == Y:\n print("Yes")\nelse:\n print("No")\n\nprint(T,C)', 'C,D=input().split(\'\')\nC=int(C)\nD=int(D)\n\nnumb=4*C\nif D>numb:\n print("No.")\nelse:\n print("Yes.")\n', 'X,Y=input().split(\' \')\n\nX=int(X)\nY=int(Y)\n\nnum=4*A\n\nif B>num:\n print("No")\nelse:\n print("Yes")', 'i = list(map(int, input().split()))\n\nCrane = 2\nTurtle = 4\n\n\nX=i[0]\nY=i[1]\n\nC=0\nT=0\nnoAnimal = 0\n\ndef Calculate (C,T,Crane,Turtle):\n for C in range(100):\n \n for T in range(100):\n Leg = (T*Turtle)+(C*Crane)\n if Leg > 100:\n return False\n \n if Leg == Y:\n noAnimal = C+T\n return True\n return False\n \n\n\nprint (Calculate(C,T,Crane,Turtle))', "#include<bits/stdc++.h>\nusing namespace std;\n//using namespace __gnu_pbds;\n//typedef tree<ii,null_type,less<ii>,rb_tree_tag,tree_order_statistics_node_update> set_t;\n#define fast ios_base::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL);\n\n#define mt make_tuple\n#define pb push_back\n#define pf push_front\n\n#define rev(n,d) for(int i=n;i>=d;i--)\n#define FOR0(n) for(int i=0;i<n;i++)\n#define FOR(a,n) for(int i=a;i<n;i++)\n#define FORQ(a,n) for(int i=a;i<=n;i++)\n#define inf 1000000009\n#define inff 0x3f3f3f3f\n\n#define all(c) c.begin(), c.end()\n\n#define ss second\n\n#define mod 1000000007\n#define mem(ar,x) memset(ar,x,sizeof ar)\n\n#define max3(a,b,c) return (lli(a)>lli(b)?(lli(a)>lli(c)?a:c):(lli(b)>lli(c)?b:c))\n#define max4(a,b,c,d) return (max3(a,b,c)>lli(d)?(max3(a,b,c)):d)\n#define min3(a,b,c) return (lli(a)<lli(b)?(lli(a)<lli(c)?a:c):(lli(b)<lli(c)?b:c))\n#define min4(a,b,c,d) return (max3(a,b,c)<lli(d)?(max3(a,b,c)):d)\ntypedef long long int lli;\ntypedef pair<int,int> pii;\ntypedef pair<int,pii>ppii;\ntypedef vector<int>vi;\ntypedef vector<vi>vvi;\ntypedef vector<pii>vpii;\nconst int N=100005;\nint dr8[]={0,0,1,-1,1,1,-1,-1};\nint dc8[]={1,-1,0,0,-1,1,-1,1};\nint dr4[]={0,1,-1,0};\nint dc4[]={1,0,0,-1};\nint n,m,k;\nint main(){\n\tfast\n\tcin>>n>>m>>k;\n\tint sx,sy,ex,ey;\n\tcin>>sx>>sy>>ex>>ey;\n\tpii came[n][m];\n\tsx--;sy--;ex--;ey--;\n\tchar a[n][m];\n\tFOR0(n){\n\t\tfor(int j=0;j<m;j++) cin>>a[i][j];\n\t}\n\tint vis[n][m];\n\tmem(vis,-1);\n\tqueue<pair<int,int> >q;\n\tvis[sx][sy]=0;\n\tq.push({sx,sy});\n\tmem(came,-1);\n\tcame[sx][sy]={-1,-1};\n\twhile(!q.empty()){\n\t\tpii f=q.front();\n\t\tq.pop();\n\t\tint x=f.ff,y=f.ss;\n\t\tfor(int i=1;i<=k;i++){\n\t\t\tint yy=y+i;\n\t\t\tif(yy>=m) break;\n\t\t\tif(a[x][yy]=='@') break;\n\t\t\telse if(vis[x][yy]==-1){\n\t\t\t\tvis[x][yy]=vis[x][y]+1;\n\t\t\t\tq.push({x,yy});\n\t\t\t\tcame[x][yy]={x,y};\n\t\t\t}\n\t\t\telse if(came[x][yy]==came[x][y]) break;\n\t\t}\n\t\tfor(int i=1;i<=k;i++){\n\t\t\tint yy=y-i;\n\t\t\tif(yy<0) break;\n\t\t\tif(a[x][yy]=='@') break;\n\t\t\telse if(vis[x][yy]==-1){\n\t\t\t\tvis[x][yy]=vis[x][y]+1;\n\t\t\t\tq.push({x,yy});\n\t\t\t\tcame[x][yy]={x,y};\n\t\t\t}\n\t\t\telse if(came[x][yy]==came[x][y]) break;\n\t\t}\n\t\tfor(int i=1;i<=k;i++){\n\t\t\tint xx=x+i;\n\t\t\tif(xx>=n) break;\n\t\t\tif(a[xx][y]=='@') break;\n\t\t\telse if(vis[xx][y]==-1){\n\t\t\t\tvis[xx][y]=vis[x][y]+1;\n\t\t\t\tq.push({xx,y});\n\t\t\t\tcame[xx][y]={x,y};\n\t\t\t}\n\t\t\telse if(came[xx][y]==came[x][y]) break;\n\t\t}\n\t\tfor(int i=1;i<=k;i++){\n\t\t\tint xx=x-i;\n\t\t\tif(xx<0) break;\n\t\t\tif(a[xx][y]=='@') break;\n\t\t\telse if(vis[xx][y]==-1){\n\t\t\t\tvis[xx][y]=vis[x][y]+1;\n\t\t\t\tq.push({xx,y});\n\t\t\t\tcame[xx][y]={x,y};\n\t\t\t}\n\t\t\telse if(came[xx][y]==came[x][y]) break;\n\t\t}\n\t}\n\tcout<<vis[ex][ey];\n}", 'X,Y = map(input().split()) #input number of animals and legs\n\ncrane_legs = 2\nturtle_legs = 4\n\nanswer = "No"\n\nfor i in range(X+1): #X+1 because it will only consider 0,1,2\n remaining=X-i #\n if crane_legs*i + turtle_legs*remaining == Y:\n answer = "Yes"\n#Loop to check combinations of animals is correct\n\nprint(answer)', 'animals= input()\nlegs= input()\n\nfor i in range (len(animals)):\n\n if int(legs) % 2 ==0: #to check if it\'s even then there is a possibility of combination\n print ("yes")\n elif int(legs) % 4 ==0:\n print ("yes")\n elif int(legs) % 2 !=0:\n print ("no")\n elif int(legs) % 4 !=0:\n print ("no")', 'X,Y = map(input().split()) #input number of animals and legs\n\ncrane_legs = 2\nturtle_legs = 4\n\nanswer = "No"\n\nfor i in range(X+1): #X+1 because it will only consider 0,1,2\n remaining=X-i #\n if crane_legs*i + turtle_legs*remaining == y:\n answer = "Yes"\n#Loop to check combinations of animals is correct\n\nprint(answer)', '#getting input from user\n#cranes and turtle already give the information\n#condition yes or no \nX,Y= map(int,input().split())\ncranes= 2 # assign 2 to cranes\nturtles= 4 # assign 4 to turtle\nans="No"\nfor i in range(X+1): \n b=X-i\n if cranes*i + turtles*b == Y:\n ans = "Yes"\nprint(ans)\n\n# Time complixity O(X)']
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s020354041', 's162087065', 's254207716', 's327200112', 's503885311', 's551935058', 's707667047', 's797935968', 's658441936']
[9064.0, 9088.0, 9116.0, 9140.0, 9012.0, 9004.0, 9056.0, 9000.0, 9144.0]
[26.0, 27.0, 26.0, 28.0, 20.0, 22.0, 21.0, 26.0, 25.0]
[328, 102, 100, 460, 2786, 328, 325, 328, 317]
p02640
u354804355
2,000
1,048,576
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.
["x, y = map(int, input().split())\nc = (4 * x - y) / 2\nif c.is_integer() and c >= 0:\n print('YES')\nelse:\n print('NO')", "x, y = map(int, input().split())\nc = (4 * x - y) / 2\nt = (y - 2*x) / 2\nif c.is_integer() and c >= 0 and t.is_integer() and t >= 0:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s383049425', 's781477390']
[9160.0, 9168.0]
[23.0, 23.0]
[121, 169]
p02640
u358943774
2,000
1,048,576
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.
['i=(input().split())\nx=int(i[0])\ny=int(i[1])\n\na=(4*x-y)/2\nb=(y-2*x)/2\n\nif a.is_integer() and b.is_integer() and a>=0 and b>=0:\n print("YES")\nelse:\n print("NO")\n', 'i=(input().split())\nx=int(i[0])\ny=int(i[1])\n\na=(4*x-y)/2\nb=(y-2*x)/2\n\nif a.is_integer() and b.is_integer() and a>=0 and b>=0:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s716888380', 's278957863']
[9168.0, 9116.0]
[25.0, 21.0]
[165, 164]
p02640
u360748099
2,000
1,048,576
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.
['X,Y = map(int,input().split())\n\nif Y%2==0:\n if X*2 <= Y and Y <= X*2:\n print("Yes")\n else:\n print("No")\n\nelse:\n print("No")', 'X,Y = map(int,input().split())\n\nif Y%2==0:\n if X*2 <= Y and Y <= X*4:\n print("Yes")\n else:\n print("No")\n\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s060581505', 's807301267']
[9164.0, 9108.0]
[20.0, 24.0]
[146, 146]
p02640
u362031378
2,000
1,048,576
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.
["x,y = map(int,input().split())\n\nb=abs(y-2*x)\n\n\nif b==0:\n print('Yes')\nelif b<0:\n print('No')\nelif b%2!=0:\n print('No')\n \nelif x >=b/2:\n print(x,y,b/2)\n print('Yes')\nelse:\n print('No')\n\n ", "x,y = map(int,input().split())\n\nb=y-2*x\n\n\nif b==0:\n print('Yes')\nelif b<0:\n print('No')\nelif b%2!=0:\n print('No')\n \nelif x >=b/2:\n \n print('Yes')\nelse:\n print('No')\n"]
['Wrong Answer', 'Accepted']
['s019760075', 's229410619']
[9184.0, 9172.0]
[22.0, 20.0]
[196, 172]
p02640
u363080243
2,000
1,048,576
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.
['a, b = map(int, input().split())\nc = b//4\nd = b%4\ne = d//2\nif c+e== a:\n print("Yes")\nelse:\n print("No")', "x, y = map(int, input().split())\nans = 'No'\nfor t in range(0, x+1):\n c = x - t\n if 4*t + 2*c == y:\n ans = 'Yes'\nprint(ans)\n"]
['Wrong Answer', 'Accepted']
['s499637167', 's661425677']
[9140.0, 9164.0]
[23.0, 21.0]
[109, 136]
p02640
u366424761
2,000
1,048,576
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.
["x,y = map(int,input().split())\nif 2*x == y:\n print('Yes')\nelse: \n for i in range(x):\n ashi = 2 * i + 4 * (x-i)\n if ashi == y:\n print('Yes')\n break\n print('No')", "x,y = map(int,input().split())\ni = 0\nif 2*x == y:\n print('Yes')\nelse: \n while True:\n ashi = 2 * i + 4 * (x-i)\n if ashi == y:\n print('Yes')\n break\n if i==x-1:\n print('No')\n break\n i = i + 1"]
['Wrong Answer', 'Accepted']
['s324156289', 's343158498']
[9172.0, 9200.0]
[22.0, 21.0]
[206, 268]
p02640
u366796457
2,000
1,048,576
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.
['try:\n\tN, M = map(int,input().split())\n\tfor i in range(1, N+1):\n \tf = 2 * i + 4 * (N - i)\n \tif f == M:\n \t\tprint("Yes")\n \tbreak\n\telse:\n \tprint("No")\nexcept EOFError as error:', 'X,Y=map(int,input().split())\nm=(4*X-Y)/2\nn=(Y-2*X)/2\nif (m.is_integer() and m >=0 ) and (n.is_integer() and n>=0):\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s016955008', 's708119326']
[9020.0, 9180.0]
[24.0, 21.0]
[194, 153]
p02640
u366996583
2,000
1,048,576
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.
["X,Y=map(int,input().split())\nif 2*X<=Y and Y<=4*X and Y%2==0:\n print('yes')\nelse:print('no')", "a,b=map(int,input().split())\nif 2*a<=b and b<=4*a and b%2==0:\n print('yes')\nelse:print('no')", "X,Y=map(int,input().split())\nif 2*X <= Y and Y <= 4*X and Y%2 == 0:\n print('yes')\nelse:print('no')", "X,Y=map(int,input().split())\nif 2*X<=Y and Y<=4*X and Y%2==0:\n print('yes')\nelse:print('no')", "a,b=map(int,input().split())\nif 2*a<=b and b<=4*a and b%2==0:\n print('yes')\nelse:print('no')", "x,y=map(int,input().split())\nif y%2==1:\n print('No')\nelse:\n if 2*x<=y<=4*x:\n print('Yes')\n else:\n print('No')\n "]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s023332911', 's062883575', 's563588954', 's859614735', 's913959136', 's522019237']
[9056.0, 9152.0, 9100.0, 8792.0, 9052.0, 9148.0]
[28.0, 27.0, 31.0, 26.0, 29.0, 30.0]
[93, 93, 99, 97, 93, 123]
p02640
u370576244
2,000
1,048,576
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.
['X,Y = map(int,input().split())\nAns = "No"\nif Y%2 = 0:\n if 2*X<=Y and Y<=4*X:\n Ans = "Yes"\n\nprint(Ans)', 'X,Y = map(int,input().split())\nAns = "No"\nif Y%2 == 0:\n if 2*X<=Y and Y<=4*X:\n Ans = "Yes"\n\nprint(Ans)']
['Runtime Error', 'Accepted']
['s370608965', 's251835422']
[8812.0, 9148.0]
[27.0, 29.0]
[111, 112]
p02640
u371686382
2,000
1,048,576
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.
["X, Y = list(map(int, input().split()))\n\nis_exist = False\nfor gruidaes in range(X + 1):\n turtles = X - gruidaes\n if turtles * 4 + gruidaes * 2 == Y:\n is_exist = True\n break\n\nif is_exist:\n print('YES')\nelse:\n print('NO')", "X, Y = list(map(int, input().split()))\n\nis_exist = False\nfor gruidaes in range(X + 1):\n turtles = X - gruidaes\n if turtles * 4 + gruidaes * 2 == Y:\n is_exist = True\n break\n\nif is_exist:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s008418809', 's196052377']
[9176.0, 9176.0]
[22.0, 21.0]
[228, 228]
p02640
u372201459
2,000
1,048,576
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.
['import argparse\nimport collections\nimport logging.config\nimport sys\nimport csv\nimport numpy as np\n\ndef main():\n s=input().split(" ")\n si = []\n for d in s:\n si.append(int(d))\n ans = "no"\n for i in range(si[0]+1):\n if (si[1] == si[0]*4-2*i) : ans = "yes"\n print (ans)\n\nif __name__ == \'__main__\':\n main()\n', 'import argparse\nimport collections\nimport logging.config\nimport sys\nimport csv\nimport numpy as np\n\ndef main():\n s=input().split(" ")\n si = []\n for d in s:\n si.append(int(d))\n print (si)\n ans = "no"\n for i in range(si[0]+1):\n if (si[1] == si[0]*4-2*i) : ans = "yes"\n print (ans)\n\nif __name__ == \'__main__\':\n main()\n', 'import argparse\nimport collections\nimport logging.config\nimport sys\nimport csv\nimport numpy as np\n\ndef tester(x, y):\n ans = "No"\n for i in range(x+1):\n if (y == x*4-2*i) : ans = "Yes"\n return (ans)\n\ndef main():\n s=input().split(" ")\n si = []\n for d in s:\n si.append(int(d))\n print (tester(si[0],si[1]))\n\nif __name__ == \'__main__\':\n main()\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s061434410', 's483944166', 's002488249']
[28832.0, 28860.0, 28792.0]
[132.0, 140.0, 135.0]
[337, 352, 377]
p02640
u377072670
2,000
1,048,576
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.
['x, y = map(int, input().split())\n\nif (2*x < y) or (4*x < y) or (y == 0):\n print("No")\n exit()\n\nif (y % 6 == 2) or (y % 6 == 4) or (y % 6 == 0):\n print("Yes")\nelse:\n print("No")\n', 'x, y = map(int, input().split())\n\n#turu = (4*x-y)//2\n\n# if (turu < 0) or (2*x > y):\n# print("No")\n# exit()\n\n# if ((y-turu*2) % 4 == 0):\n# print("Yes")\n# else:\n# print("No")\n\nans = "No"\nfor c in range(x+1):\n t = x-c\n if 2*c + 4*t == y:\n ans = "Yes"\n break\n\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s885358550', 's000889806']
[9176.0, 9152.0]
[21.0, 30.0]
[189, 299]
p02640
u382169668
2,000
1,048,576
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.
['n, legs= map(int, input().split(" "))\n\nx = (legs - 2*n)/2\ny = (4*n - legs)/2\n\nif X%1==0 and y%1==0 and x>0 and y>0:\n print(\'Yes\')\nelse:\n print(\'No\')', 'n, legs= map(int, input().split(" "))\n\nx = (legs - 2*n)/2\ny = (4*n - legs)/2\n\nif x%1==0 and y%1==0 and (x>=0 and y>=0):\n print(\'Yes\')\nelse:\n print(\'No\')\n']
['Runtime Error', 'Accepted']
['s180385694', 's513794336']
[9176.0, 9232.0]
[24.0, 22.0]
[150, 155]
p02640
u383429137
2,000
1,048,576
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.
['X,Y = map(int, input().split())\nif Y%2==1:\n print("NO")\nelse:\n kame=Y//4\n Y=Y//4\n turu=Y//2\n if (turu+kame)==X:\n print("YES")\n else:\n print(\'NO\')\n', 'X,Y = map(int, input().split())\nif Y%2==1:\n print("No")\nelse:\n kame=Y//4\n Y=Y-(kame*4)\n turu=Y//2\n if (turu+kame)==X:\n print("Yes")\n else:\n print(\'No\')\n', "X,Y = map(int, input().split())\nif Y%2==1:\n print('No')\nelse:\n if X*4<=Y and X*2>=Y:\n print('Yes')\n else:\n print('No')\n", 'X,Y = map(int, input().split())\nif Y%2==1:\n print("NO")\nelse:\n kame=Y//4\n Y-=(kame*4)\n turu=Y//2\n if (turu+kame)==X:\n print("Yes")\n else:\n print(\'No\')\n', "X,Y = map(int, input().split())\nif Y%2==1:\n print('No')\nelse:\n if X*2<=Y and Y<=X*4:\n print('Yes')\n else:\n print('No')\n"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s176998945', 's388495661', 's491847410', 's579245405', 's069420870']
[9000.0, 9148.0, 9144.0, 9100.0, 9104.0]
[26.0, 26.0, 30.0, 30.0, 28.0]
[178, 184, 142, 183, 142]
p02640
u384793271
2,000
1,048,576
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.
["for a in range(x + 1):\n b = x - a\n if (2 * a + 4 * b) == y:\n print('Yes')\n exit()\nprint('No')", "x, y = map(int, input().split())\n\nfor a in range(x + 1):\n b = x - a\n if (2 * a + 4 * b) == y:\n print('Yes')\n exit()\nprint('No')\n"]
['Runtime Error', 'Accepted']
['s312828181', 's585103237']
[8972.0, 9036.0]
[29.0, 26.0]
[113, 148]
p02640
u386850803
2,000
1,048,576
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.
["X, Y = map(int, input().split())\n\nt = 1/2 * Y - X\nc = X - t\n\nfloat(t).is_integer()\nif t > 0 and float(t).is_integer() and c > 0 and float(c).is_integer():\n print('yes')\nelse:\n print('no')\n", "X, Y = map(int, input().split())\n\nt = 1/2 * Y - X\nc = X - t\n\nfloat(t).is_integer()\nif t >= 0 and float(t).is_integer() and c >= 0 and float(c).is_integer():\n print('Yes')\nelse:\n print('No')\n"]
['Wrong Answer', 'Accepted']
['s480824630', 's839589150']
[9096.0, 9144.0]
[21.0, 21.0]
[190, 192]
p02640
u391442102
2,000
1,048,576
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.
["X,Y = map(int,input().split())\nfor i in range(0, X+1):\n f = 2 * i + 4 * (X - i)\n if f == Y:\n print('Yes')\n break\n else:\n print('No')\n break", "X,Y = map(int,input().split())\nfor i in range(0, X+1):\n f = 2 * i + 4 * (X - i)\n if f == Y:\n print('Yes')\n break\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s271149318', 's628424928']
[9172.0, 9168.0]
[19.0, 22.0]
[158, 144]
p02640
u392361133
2,000
1,048,576
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.
['x, y = map(int, input().split())\naa = y - 2 * x\na = aa / 2\nb = x - a\nprint("Yes" if 0 <= a <= x and 0 <= b <= x and a + b == x and 4 * a + 2 * b == 7else \'No\')\n', "x, y = map(int, input().split())\naa = y - 2 * x\na = aa / 2\nprint('Yes' if 0 <= a <= x and aa % 2 ==0 else 'No')\n"]
['Wrong Answer', 'Accepted']
['s048328059', 's982360534']
[9172.0, 9156.0]
[22.0, 24.0]
[161, 113]
p02640
u394489905
2,000
1,048,576
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.
["X, Y = map(int, input().split())\n ans = 'No'\nfor a in range(X + 1):\n b = X - a\n if 2 * a + 4 * b == Y:\n ans = 'Yes'\nprint(ans)", "X, Y = map(int, input().split())\nans = 'No'\nfor a in range(X + 1):\n b = X - a\n if 2 * a + 4 * b == Y:\n ans = 'Yes'\nprint(ans)"]
['Runtime Error', 'Accepted']
['s195047275', 's912194801']
[9008.0, 9156.0]
[22.0, 30.0]
[131, 130]
p02640
u394731058
2,000
1,048,576
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.
["ans = 'No'\nx, y = map(int, input().split())\nfor i in range(x+1):\n if (2 * x) + (4 * (x-i)) == y:\n ans = 'Yes'\n break\nprint(ans)", "ans = 'No'\nx, y = map(int, input().split())\nfor i in range(x+1):\n if 2 * x + 4 * (x-i) == y:\n ans = 'Yes'\n break\nprint(ans)", "ans = 'No'\nx ,y = map(int, input().split())\nfor i in range(x+1):\n if 2 * x + 4 * (x-i) == y:\n ans = 'Yes'\n break\nprint(ans)", "ans = 'No'\nx, y = map(int, input().split())\nfor i in range(x+1):\n if (2 * i) + (4 * (x-i)) == y:\n ans = 'Yes'\n break\nprint(ans)"]
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s103765196', 's176570601', 's985516949', 's484822909']
[9164.0, 9176.0, 9020.0, 9176.0]
[22.0, 22.0, 22.0, 20.0]
[134, 130, 134, 134]
p02640
u400982556
2,000
1,048,576
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.
['x,y = map(int,input().split())\n\nfor i in range(X):\n for j in range(X):\n if 2*i+4*j == Y:\n print("Yes")\n exit()\n\nprint("No")', 'x,y = map(int,input().split())\n\nfor i in range(x+1):\n for j in range(x+1):\n if 2*i+4*j == y and i+j == x:\n print("Yes")\n exit()\n\nprint("No")']
['Runtime Error', 'Accepted']
['s007624372', 's099244906']
[9188.0, 9172.0]
[24.0, 22.0]
[137, 154]
p02640
u401686269
2,000
1,048,576
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.
["X, Y = map(int, input().split())\nfor i in range(X):\n if 2*(i+1) + 4*(X-i-1) == Y:\n print('Yes')\nprint('No')", 'x, y = map(int, input().split())\n\nif (2*x <= y <= 4*x) and (y % 2 == 0):\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s709206947', 's038512531']
[8984.0, 9124.0]
[29.0, 27.0]
[111, 107]
p02640
u402428218
2,000
1,048,576
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.
['L = [int(i) for i in input().split()]\nflag=0\nfor i in range(L[0]+1):\n # print(L[1]-i*2-(L[0]-i)*4)\n if L[1]-i*2-(L[0]-i)*4==0:\n print("Yes")\n flag=1\n break\n if L[1]<i*2+(L[0]-i)*4:\n # print("df")\n break\n\nif flag==0:\n print("No")', 'L = [int(i) for i in input().split()]\nflag=0\nfor i in range(L[0]+1):\n # print(L[1]-i*2-(L[0]-i)*4)\n if L[1]-i*2-(L[0]-i)*4==0:\n print("Yes")\n flag=1\n break\n # if L[1]<i*2+(L[0]-i)*4:\n # print("df")\n # break\n\nif flag==0:\n print("No")']
['Wrong Answer', 'Accepted']
['s385117865', 's783690129']
[9188.0, 9184.0]
[24.0, 22.0]
[275, 279]
p02640
u404092236
2,000
1,048,576
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.
["x, y = map(int, input().split())\nsub = x*2 - y\nif sub % 2 == 0 and 0 <= sub <= x:\n print('Yes')\nelse:\n print('No')", "x, y = map(int, input().split())\nsub = y - x * 2\nif sub % 2 == 0 and 0 <= sub / 2 <= x:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s113012978', 's803304536']
[9168.0, 9140.0]
[22.0, 23.0]
[116, 122]
p02640
u408791346
2,000
1,048,576
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.
["x, y = map(int,input().split())\nt , k = 2 , 4\nans = 0\nfor i in range(x+1):\n print(i, x-i)\n if y == (t*i + k*(x-i)):\n ans += 1\n\nif ans == 0:\n print('No')\nelse:\n print('Yes')", "x, y = map(int,input().split())\nt , k = 2 , 4\nans = 0\nfor i in range(x+1):\n if y == (t*i + k*(x-i)):\n ans += 1\n\nif ans == 0:\n print('No')\nelse:\n print('Yes')"]
['Wrong Answer', 'Accepted']
['s495774886', 's094983146']
[9120.0, 9184.0]
[23.0, 19.0]
[191, 173]
p02640
u408958033
2,000
1,048,576
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.
['from math import *\n\ndef cin(): # To take limited number of inputs\n return map(int,input().split())\n\ndef cins(): # To take space sepreated strings\n return input.split()\n\ndef cino(test=False): # To take individual int input (test = False)\n if not test:\n return int(input())\n else: # To take string input (test = True)\n return input()\n\ndef cina(): # array input\n return list(map(int,input().split()))\n\ndef ssplit(): # multiple string input\n return list(input().split())\n\ndef printlist(l): # To print space seperated array\n for i in l:\n print(i,end=" ")\n\ndef main():\n a,b = cin()\n cnt = 0\n while b>0:\n b-=2\n cnt += 1\n if cnt<=a:\n print("Yes")\n else:\n print("No")\n\n\nif __name__ == \'__main__\':\n main()\n', 'from math import *\n\ndef cin(): # To take limited number of inputs\n return map(int,input().split())\n\ndef cins(): # To take space sepreated strings\n return input.split()\n\ndef cino(test=False): # To take individual int input (test = False)\n if not test:\n return int(input())\n else: # To take string input (test = True)\n return input()\n\ndef cina(): # array input\n return list(map(int,input().split()))\n\ndef ssplit(): # multiple string input\n return list(input().split())\n\ndef printlist(l): # To print space seperated array\n for i in l:\n print(i,end=" ")\n\ndef main():\n a,b = cin()\n if b>=2*a and b<=4*a and not b&1:\n print("Yes")\n else:\n print("No")\n\n\nif __name__ == \'__main__\':\n main()\n']
['Wrong Answer', 'Accepted']
['s779782560', 's829599954']
[9140.0, 9200.0]
[24.0, 24.0]
[782, 748]
p02640
u409306788
2,000
1,048,576
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.
["# B - Crane and Turtle\nx, y = map(int, input().split())\n\nfor crane in range(x + 1):\n\tturtle = x - crane\n\t\n\tif crane * 2 + turtle * 4 == y:\n\t\tprint('YES')\n\t\texit()\n\nprint('NO')", "import sys\ninput = sys.stdin.readline\n\n# B - Crane and Turtle\nx, y = map(int, input().split())\n\nfor crane in range(x + 1):\n\tturtle = x - crane\n\t\n\tif crane * 2 + turtle * 4 == y:\n\t\tprint('YES')\n\t\texit()\n\nprint('NO')", "import sys\ninput = sys.stdin.readline\n\n# B - Crane and Turtle\nx, y = map(int, input().split())\n\nfor crane in range(x + 1):\n\tturtle = x - crane\n\t\n\tif crane * 2 + turtle * 4 == y:\n\t\tprint('Yes')\n\t\texit()\n\nprint('No')"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s328632990', 's786124596', 's772232931']
[9160.0, 9168.0, 8948.0]
[27.0, 28.0, 30.0]
[175, 214, 214]
p02640
u410715775
2,000
1,048,576
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.
['n, m = map(int, input().split())\nif m % 2 and n * 2 <= m <= n * 4:\n print("Yes")\nelse:\n print("No")', 'n, m = map(int, input().split())\nif m % 2 == 0 and n * 2 <= m <= n * 4:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s236228284', 's387560921']
[9132.0, 9016.0]
[27.0, 25.0]
[105, 110]