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 | u585963734 | 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+1):\n for j in range(X-i+1):\n print(i,j)\n if 2*i+4*(X-i)==Y:\n print('Yes')\n exit(0)\n\nprint('No')", "X,Y=map(int, input().split())\n\nif 0<=(4*X-Y)//2<=X and (4*X-Y)%2==0:\n print('Yes')\n exit(0)\n\nprint('No')"] | ['Wrong Answer', 'Accepted'] | ['s450612219', 's381427811'] | [9364.0, 9172.0] | [25.0, 23.0] | [182, 110] |
p02640 | u588785393 | 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\tprint('No')\nelse:\n\tb = y // 2 - x\n\ta = 2 * x - y\n\tif a >= 0 and b >= 0:\n\t\tprint('Yes')\n\telse:\n\t\tprint('No')\n", "x, y = map(int, input().split())\nif y % 2 != 0:\n\tprint('No')\nelse:\n\tb = y // 2 - x\n\ta = 2 * x - y/2\n\tif a >= 0 and b >= 0:\n\t\tprint('Yes')\n\telse:\n\t\tprint('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s248206316', 's964310284'] | [9164.0, 9164.0] | [24.0, 21.0] | [157, 159] |
p02640 | u589695410 | 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# check for only cranes\nif x * 2 == y or x * 4 == y:\n print("Yes")\nelse:\n print("No")', 'x, y = map(int ,input().split()) \nfor i in range(x):\n\tif (i*2 + (x-i)*4 == y) or (i*4 + (x-i)*2 == y):\n\t\tprint("Yes")\n\t\tbreak\n\telif i == x - 1:\n\t\tprint("No")'] | ['Wrong Answer', 'Accepted'] | ['s379697883', 's831121615'] | [9164.0, 9176.0] | [24.0, 23.0] | [124, 157] |
p02640 | u592826944 | 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 collections import deque,defaultdict\nfrom math import ceil,floor,inf,sqrt,factorial,gcd,log2\nfrom copy import deepcopy\nii1=lambda:int(stdin.readline().strip())\nis1=lambda:stdin.readline().strip()\niia=lambda:list(map(int,stdin.readline().strip().split()))\nisa=lambda:stdin.readline().strip().split()\nmod=1000000007\nani,total = iia()\nif 0<=(4*ani-total)<=2*ani:\n print('Yes')\nelse:\n print('No')", "from sys import stdin,stdout\nimport math\nfrom collections import deque,defaultdict\nfrom math import ceil,floor,inf,sqrt,factorial,gcd,log2\nfrom copy import deepcopy\nii1=lambda:int(stdin.readline().strip())\nis1=lambda:stdin.readline().strip()\niia=lambda:list(map(int,stdin.readline().strip().split()))\nisa=lambda:stdin.readline().strip().split()\nmod=1000000007\nani,total = iia()\nif 0<=(4*ani-total)<=2*ani:\n print('Yes')\nelse:\n print('No'", "from sys import stdin,stdout\nimport math\nfrom collections import deque,defaultdict\nfrom math import ceil,floor,inf,sqrt,factorial,gcd,log2\nfrom copy import deepcopy\nii1=lambda:int(stdin.readline().strip())\nis1=lambda:stdin.readline().strip()\niia=lambda:list(map(int,stdin.readline().strip().split()))\nisa=lambda:stdin.readline().strip().split()\nmod=1000000007\nani,total = iia()\nif total>4*ani:\n print('No')\nelif total % 2==0:\n crane=(4*ani - total)\n tor = total-2*ani\n if crane%2==0 or tor%2==0:\n if 0<=crane//2<=ani and 0<=tor//2<=ani:\n print('Yes')\n else:\n print('No')\n else:\n print('No')\nelse:\n print('No')"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s501080120', 's564210338', 's635681166'] | [9556.0, 9056.0, 9568.0] | [31.0, 22.0, 27.0] | [403, 443, 670] |
p02640 | u593019570 | 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())\n\nfor i in range(a + 1):\n if i * 2 + (a - i) * 4 == b:\n print("YES")\n exit()\n\nprint(\'NO\')', 'a, b = map(int,input().split())\n\nfor i in range(a + 1):\n if i * 2 + (a - i) * 4 == b:\n print("Yes")\n exit()\n\nprint(\'No\')'] | ['Wrong Answer', 'Accepted'] | ['s007019650', 's049636198'] | [9168.0, 9160.0] | [23.0, 24.0] | [131, 131] |
p02640 | u598684283 | 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 = int(input().split())\nif y % 2 == 1:\n print("No")\nelif 2 * x <= y <= 4 * x:\n print("Yes")\nelse:\n print("No")', 'x,y = map(int, input().split())\nif y % 2 == 1:\n print("No")\nelif 2 * x <= y <= 4 * x:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s493267512', 's428015244'] | [9064.0, 9000.0] | [24.0, 25.0] | [122, 127] |
p02640 | u599004729 | 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 x in range(0, X+1):\n if 2 * x + 4 * (X-x) == Y:\n print('Yes')\n sys.exit()\nprint('No'", "import sys\nX, Y = map(int, input().split())\n\nfor x in range(0, X+1):\n if 2 * x + 4 * (X-x) == Y:\n print('Yes')\n sys.exit()\nprint('No')"] | ['Runtime Error', 'Accepted'] | ['s711097758', 's198857620'] | [8968.0, 9164.0] | [22.0, 24.0] | [150, 151] |
p02640 | u602981537 | 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. | ['line = input().split()\n\nhontai = int(line[0])\nashi = int(line[1])\nflag = "true"\n\nfor i in range(hontai+1):\n kame = int(i)\n tsuru = int(hontai-kame)\n if ashi == (4*kame)+(2*tsuru):\n print("yes")\n flag = "false"\n break\n\nif flag=="true":\n print("no")', 'line = input().split()\n\nhontai = int(line[0])\nashi = int(line[1])\nflag = "true"\n\nfor i in range(hontai+1):\n kame = int(i)\n tsuru = int(hontai-kame)\n if ashi == (4*kame)+(2*tsuru):\n print("Yes")\n flag = "false"\n break\n\nif flag=="true":\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s096267205', 's912125295'] | [9156.0, 9192.0] | [30.0, 28.0] | [260, 260] |
p02640 | u605853674 | 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 % x == 2:\n print("Yes")\n\nif y % x == 0:\n print("Yes")\n\nelse:\n print("No")\n', 'x, y = map(int, input().split())\n\nif x*4<y:\n print("No")\n\nelif y/2<x:\n print ("No")\n\nelif y % 2 == 0:\n print("Yes")\n\nelse:\n print("No")\n'] | ['Wrong Answer', 'Accepted'] | ['s415925649', 's102142007'] | [9096.0, 9060.0] | [26.0, 27.0] | [122, 148] |
p02640 | u608080019 | 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. | ['values = input().split()\nprint(values)\n\nnum_animals = int(values[0])\nnum_legs = int(values[1])\n\nmax_possible_legs = num_animals*4\nmin_possible_legs = num_animals*2\n\nif num_legs%2 != 0:\n print ("No")\n\nelif (num_legs <= max_possible_legs) and (num_legs >= min_possible_legs):\n print("Yes")\n\nelse:\n print("No")\n ', 'values = input().split()\n\nnum_animals = int(values[0])\nnum_legs = int(values[1])\n\nmax_possible_legs = num_animals*4\nmin_possible_legs = num_animals*2\n\nif num_legs%2 != 0:\n print ("No")\n\nelif (num_legs <= max_possible_legs) and (num_legs >= min_possible_legs):\n print("Yes")\n\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s355649409', 's415396314'] | [9048.0, 9128.0] | [25.0, 28.0] | [321, 302] |
p02640 | u608355135 | 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(1000):\n if 2*i==y-2*x:\n if i>x:\n print("NO")\n quit()\n else:\n print("YES")\n quit()\nprint("NO")', 'x,y=map(int,input().split())\nfor i in range(1000):\n if 2*i==y-2*x:\n if i>x:\n print("No")\n quit()\n else:\n print("Yes")\n quit()\nprint("No")'] | ['Wrong Answer', 'Accepted'] | ['s455605609', 's489958472'] | [9052.0, 9108.0] | [21.0, 21.0] | [198, 198] |
p02640 | u608755339 | 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. | ['[S,Y] = [int(i) for i in input().split()]\nS += 1\nf = True\nfor x in range(S):\n for y in range(S-x):\n if 4*x + 2*y == Y:\n print("Yes")\n f = False\n break\n \nif f:\n print("No")', '[S,Y] = [int(i) for i in input().split()]\nS += 1\nf = True\n\nif Y % 2 == 1:\n print("No")\nelse:\n for x in range(S):\n for y in range(S-x):\n if 4*x + 2*y == Y:\n print("Yes")\n f = False\n break\n\nif f:\n print("No")', '[S,Y] = [int(i) for i in input().split()]\n\nif Y % 2 == 1:\n print("No")\nelse:\n for x in range(S+1):\n y = S - x\n if 4*x + 2*y == Y:\n print("Yes")\n break\n else:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s560450374', 's850092502', 's301090015'] | [9180.0, 9180.0, 9112.0] | [25.0, 21.0, 24.0] | [198, 238, 192] |
p02640 | u614054255 | 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())\na=False\n\nfor i in range(0,x+1):\n print(i, x-i)\n if i*2+(x-i)*4==y:\n a=True\n break\n \nif a==True:\n print("Yes")\nelse:\n print("No")', 'x,y=map(int, input().split())\na=False\n\nfor i in range(0,x+1):\n print(i, x-i)\n if i*2+(x-i)*4==y:\n a=True\n break\n \nif a==True:\n print("Yes")\nelse:\n print("No")', 'x,y=map(int, input().split())\na=False\n\nfor i in range(0,x+1):\n if i*2+(x-i)*4==y:\n a=True\n break\n \nif a==True:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s407660199', 's995706407', 's739164977'] | [9176.0, 9184.0, 9172.0] | [22.0, 22.0, 24.0] | [171, 171, 155] |
p02640 | u618363477 | 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"\n\nfor c in range(x+1):\n t = x - c\n if 2*c + 4*t == y:\n ans = "YES"\nprint(ans)', 'x, y = map(int, input().split())\nans = "No"\n\nfor c in range(x+1):\n t = x - c\n if 2*c + 4*t == y:\n ans = "Yes"\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s006033741', 's382926850'] | [9100.0, 9084.0] | [28.0, 27.0] | [133, 133] |
p02640 | u618373524 | 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 math\nx,y=map(int,input().split())\n\nq = (2*x-y)/2\nprint('Yes' if q == math.ceil(q) and q >= 0 else 'No')", "x,y=map(int,input().split())\n\n\n\n\n\np = (4*x-y)/2\nq = (y-2*x)/2\nprint('Yes' if p >= 0 and q >= 0 and p.is_integer() == True and q.is_integer() == True else 'No')"] | ['Wrong Answer', 'Accepted'] | ['s656312061', 's567104960'] | [8984.0, 9172.0] | [27.0, 26.0] | [110, 216] |
p02640 | u619057641 | 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. | ['anim, leg = [int(x) for x in input().split()] \n\ny = (leg - 2anim) / 2\nx = (4anim - leg) / 2\n\nif isinstance(y, float) or isinstance(x, float) or y < 0 or x < 0:\n print("No")\nelse:\n print("Yes")', 'anim, leg = [int(x) for x in input().split()]\n\n\ny = (leg - 2*anim) \nx = (4*anim - leg) \n\nif y % 2 == 1 or x % 2 == 1 or y < 0 or x < 0:\n print("No")\nelse:\n print("Yes")\n'] | ['Runtime Error', 'Accepted'] | ['s325683386', 's949749983'] | [9008.0, 9164.0] | [19.0, 21.0] | [194, 177] |
p02640 | u619785253 | 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\ndef main():\n x, y = list(map(int,input().split()))\n for t in range(0,101):\n if y == (t*2+(x-t)*4):\n ans =('Yes')\n sys.exit()\n else:\n ans =('No')\n print(ans) \n \nif __name__ == '__main__':\n main()\n", "import sys\ndef main():\n x, y = list(map(int,input().split()))\n for t in range(0,101):\n if y == (t*2+(x-t)*4) and (x-t)>=0:\n# print(t,(x-t),y)\n ans =('Yes')\n break\n else:\n ans =('No')\n print(ans) \n \nif __name__ == '__main__':\n main()\n"] | ['Wrong Answer', 'Accepted'] | ['s820005918', 's073275528'] | [8960.0, 9080.0] | [32.0, 31.0] | [238, 270] |
p02640 | u623687794 | 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+1):\n 2*i + 4*(x-i) == y:\n print("Yes")\n exit()\nprint("No")', 'x,y = map(int,input().split())\nfor i in range(x+1):\n if 2*i + 4*(x-i) == y:\n print("Yes")\n exit()\nprint("No")\n'] | ['Runtime Error', 'Accepted'] | ['s048812385', 's627537407'] | [8892.0, 9160.0] | [23.0, 27.0] | [113, 117] |
p02640 | u626228246 | 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())\ncrain = (4 * N - M) / 2\nR = N - int(crain)\nif crain.is_integer():\n if crain >= 0\u3000and R > 0:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")\n', 'N, M = map(int,input().split())\ncrain = (4 * N - M) / 2\nif crain.is_integer():\n if crain >= 0\u3000and N - int(crain) > 0:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")\n', 'N, M = map(int,input().split())\ncrain = (4 * N - M) / 2\nif crain.is_integer():\n if crain >= 0\u3000and (N - int(crain)) > 0:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")\n', 'import sys\nx,y = map(int,input().split())\nfor i in range(x+1):\n for j in range(x-i+1):\n if i+j == x and (i*2)+(j*4) == y:\n print("Yes")\n sys.exit()\nprint("No")'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s240332786', 's729046832', 's926603718', 's024287766'] | [8972.0, 9044.0, 8928.0, 9112.0] | [22.0, 22.0, 20.0, 26.0] | [188, 182, 184, 173] |
p02640 | u627674248 | 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"\n\nfor a in range(x+1):\n b = x - a\n if a * 2 + b * 4 == y:\n ans = "Yse"\nprint(ans)', "X, Y= map(int, input().split())\n \nans = 'No'\nfor a in range(X + 1):\n b = X - a\n if 2 * a + 4 * b == Y:\n ans = 'Yes'\nprint(ans)"] | ['Wrong Answer', 'Accepted'] | ['s596851099', 's441658595'] | [8992.0, 9132.0] | [30.0, 27.0] | [129, 139] |
p02640 | u629201777 | 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=[int(x) for x in input().split(" ")]\nx=(b-2a)/2\ny=(4a-b)/2\nprint("Yes" if x>0 and y>0 and x%1==0.0 and y%1==0.0 else "No")', 'a,b=[int(x) for x in input().split(" ")]\nx=(b-2*a)/2\ny=(4*a-b)/2\nprint("Yes" if x>=0 and y>=0 and x%1==0.0 and y%1==0.0 else "No")\n'] | ['Runtime Error', 'Accepted'] | ['s358818399', 's940295230'] | [8968.0, 9232.0] | [22.0, 29.0] | [126, 131] |
p02640 | u629276590 | 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())\nz=0\n \nfor i in range(x):\n if i*2+(x-i)*4!==y:\n z=z\n else:\n z=1\n \nif z==1:\n print("Yes")\nelse:\n print("No")', 'x,y=map(int,input().split())\nz=0\n \nfor i in range(0,x+1):\n if i*2+(x-i)*4 == y:\n z=1\n\n \nif z==1:\n print("Yes")\nelse:\n print("No")\n '] | ['Runtime Error', 'Accepted'] | ['s752861234', 's884383145'] | [8972.0, 9168.0] | [22.0, 21.0] | [161, 154] |
p02640 | u630467326 | 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\nfor i in range(x + 1):\n for j in range(x + i):\n if i * 2 + j * 4 == y and i + j == X:\n print('yes')\n sys.exit()\n \nprint('no')\n ", "x, y = map(int, input().split())\nans = 'No'\n\nfor i in range(x + 1):\n\tj = x - i\n\tif i * 2 + j * 4 == y:\n\t\tans = 'Yes'\nprint(ans)"] | ['Runtime Error', 'Accepted'] | ['s725933177', 's982458923'] | [9156.0, 9116.0] | [23.0, 30.0] | [192, 127] |
p02640 | u632757234 | 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 and 2*X<=Y<=4*X):\n print('Yes')\nelse:\n print('No')\n", "X,Y=map(int,input.split())\n\nif(Y%2 & 2*X<=Y<=4*X):\n print('Yes')\nelse:\n print('No')", "X,Y=map(int,input().split())\n\nif(Y%2==0 and 2*X<=Y<=4*X):\n print('Yes')\nelse:\n print('No')\n"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s555138624', 's609005461', 's089325136'] | [9028.0, 8880.0, 9156.0] | [20.0, 24.0, 23.0] | [91, 85, 93] |
p02640 | u634902238 | 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=a*4\nif(b%2==1):\n print("NO")\nelse:\n if(c<b):\n print("NO")\n else:\n if(((c-b)/2)<=a):\n print("YES")\n else:\n print("NO")', 'a,b=map(int,input().split())\nc=a*4\nif(b%2==1):\n print("NO")\nelse:\n if((c-b)/2<=100):\n print("YES")\n else:\n print("NO")', 'a,b=map(int,input().split())\nc=a*4\nif(b%2==1):\n print("No")\nelse:\n if(c<b):\n print("No")\n else:\n if(((c-b)/2)<=a):\n print("Yes")\n else:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s355843589', 's635357555', 's944714550'] | [9184.0, 9176.0, 9184.0] | [24.0, 25.0, 21.0] | [200, 141, 200] |
p02640 | u635329504 | 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'\n\nfor i in X:\n j = X - i\n if (i * 2 + j * 4) == Y:\n ans = 'Yes'\n\nprint(ans)", 'X = int(input())\nY = int(input())\n\nflg = 0\nfor i in range(1, 100):\n j = X - i\n ans = i*2 + j * 4\n\n if ans == Y:\n print("Yes")\n flg = 1\n break\n\nif flg == 0:\n print("No")\n', 'X = int(input())\nY = int(input())\n\nflg = 0\nfor i in range(1, X):\n j = X - i\n ans = i*2 + j * 4\n\n if Y == ans:\n print("Yes")\n flg = 1\n break\n\nif flg == 0:\n print("No")\n', 'X = int(input())\nY = int(input())\n\nfor i in range(1, 100):\n j = X - i\n ans = i*2 + j * 4\n\n if ans == Y:\n print("Yes")\n exit(1)\n\nprint("No")\n', "X, Y = map(int, input().split())\nans = 'No'\n\nfor i in range(X+1):\n j = X - i\n if (i * 2 + j * 4) == Y:\n ans = 'Yes'\n\nprint(ans)"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s402809998', 's457966095', 's469326293', 's866450904', 's657821103'] | [8856.0, 9104.0, 9008.0, 9088.0, 9012.0] | [25.0, 25.0, 28.0, 29.0, 28.0] | [131, 202, 200, 163, 140] |
p02640 | u636256839 | 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())\nZ = 0\nANS = 'No'\nif Y % 2 == 0:\n while X >= 0:\n i = X*2 + Y*4\n if i == Y:\n ANS = 'Yes'\n X -= 1\n Z += 1\n \nprint(ANS)\n", 'X, Y = map(int, input().split())\nif ((Y//X) + ((Y*2)//X)) == X:\n print("Yes")\nelif X == 1:\n print("Yes")\nelse:\n print("No")\n', "X, Y = map(int, input().split())\nZ = 0\nANS = 'No'\nif Y % 2 == 0:\n while X >= 0:\n i = X*2 + Y*4\n if i == Y:\n ANS = 'Yes'\n Z += 1\n X -= 1\nprint(ANS)\n", "X, Y = map(int, input().split())\nZ = 0\nANS = 'No'\nif Y % 2 == 0:\n while X >= 0:\n i = X*2 + Z*4\n if i == Y:\n ANS = 'Yes'\n X -= 1\n Z += 1\nprint(ANS)\n"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s255003714', 's862257515', 's937669443', 's428111549'] | [9164.0, 9164.0, 9200.0, 9096.0] | [23.0, 22.0, 20.0, 21.0] | [198, 133, 189, 189] |
p02640 | u643081547 | 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=list(map(int,input().split()))\nprint(a.index(0)+1)\n', 'x,y=map(int,input().split())\nif y%2==0 and 2*x<=y and y<=4*x:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s571096854', 's048794096'] | [9152.0, 9160.0] | [27.0, 25.0] | [53, 96] |
p02640 | u646661668 | 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().split()[0])\nY = int(input().split()[1])\nc = (4*X-Y)/2\nt = (Y-2*X)/2\nif c >= 0 and int(c) == c:\n if t >= 0 and int(t) == t:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")', 'X = int(input().split()[0])\nY = int(input().split()[1])\nc = (4*X-Y)/2\nt = (Y-2*X)/2\nif c >= 0 and int(c) == c:\n if t >= 0 and int(t) == t:\n \tprint("Yes")\n else:\n print("No")\nelse:\n print("No")', 'X = int((input().split())[0])\nY = int((input().split())[1])\nc = (4*X-Y)/2\nt = (Y-2*X)/2\nif c >= 0 and int(c) == c:\n if t >= 0 and int(t) == t:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")', 'XY = input().split()\nX = int(XY[0])\nY = int(XY[1])\nc = (4*X-Y)/2\nt = (Y-2*X)/2\nif c >= 0 and int(c) == c:\n if t >= 0 and int(t) == t:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s537423159', 's870415579', 's982949778', 's020986353'] | [9192.0, 9188.0, 9184.0, 9212.0] | [23.0, 23.0, 23.0, 20.0] | [214, 199, 218, 209] |
p02640 | u656377179 | 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=0\na=0\nfor i in range(0,x+1):\n if 2*s+4*(x-s)==y:\n a==100\n s=s+i\nif a==100:\n print("Yes")\nelse:\n print("No")\n\n\n\n\n\n', 'x,y=map(int,input().split())\ns=0\nfor i in range(0,x):\n if y==2*s+4*(x-s):\n s=s+i\n print("Yes")\nelse:\n print("No")\n\n\n\n\n\n\n\n', 'x,y=map(int,input().split())\ns=0\na=0\nfor i in range(0,x+1):\n if 2*s+4*(x-s)==y:\n a==100\n s=s+i\nif a==100:\n print("Yes")\nelse:\n print("No")\n\n\n\n\n\n', 'x,y=map(int,input().split())\ns=0\na=0\nfor i in range(0,x+1):\n if 2*s+4*(x-s)==y:\n a==100\n s=s+i\nif a==100:\n print("Yes")\nelse:\n print("No")\n\n\n\n\n\n', 'x,y=map(int,input().split())\nn=0\nfor i in range(0,x+1):\n if 2*i+4*(x-i)==y:\n n=n+1\nif n>0:\n print("Yes")\nelse:\n print("No")\n\n\n\n\n\n\n\n\n\n\n'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s035212161', 's624994599', 's925067468', 's970672482', 's419679407'] | [9160.0, 9140.0, 9100.0, 9108.0, 9172.0] | [28.0, 29.0, 29.0, 32.0, 29.0] | [163, 137, 163, 163, 150] |
p02640 | u656803083 | 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 = False\n\nfor i in range(101):\n for j in range(101):\n if i+j == x and 2*i + 4*j == y:\n\t\tans = True\n\nif ans:\n print("Yes")\nelse:\n print("No")', 'x, y = map(int, input().split())\nans = False\n \nfor i in range(101):\n\tfor j in range(101):\n\t\tif i+j == x and 2*i+4*j == y:\n\t\t\tans = True\nif ans:\n\tprint("Yes")\nelse:\n\tprint("No")'] | ['Runtime Error', 'Accepted'] | ['s112965290', 's912529552'] | [9004.0, 9128.0] | [22.0, 30.0] | [182, 176] |
p02640 | u658600714 | 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 and x*2=<y<=x*4:\n print('Yes')\nelse:\n print('No')", "x,y = map(int,input().split())\n\nif y%2 == 0 and x*2 <=y <=x*4:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s322808574', 's230099881'] | [9024.0, 9172.0] | [24.0, 27.0] | [95, 97] |
p02640 | u660899380 | 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 == 1):\n print("No")\nelif (Y > (X*4)):\n print("No")\nelse:\n yes = false\n for i in range(1,X+1):\n fNum = i\n tNum = X-i\n if ((fNum*4)+(tNum*2)==Y):\n print("Yes")\n yes = True\n if not (false):\n print("No")\n ', 'X, Y = map(int, input().s .- 0 \t\t\t111\t\t\t\t\t\t/plit())\n\nif (Y%2 == 1):\n print("No")\nelif (Y > (X*4)):\n print("No")\nelse:\n print("Yes")\n ', 'X, Y = map(int, input().split())\n\nif (Y%2 == 1):\n print("No")\nelif (Y > (X*4)):\n print("No")\nelse:\n yes = False\n for i in range(0,X+1):\n fNum = i\n tNum = X-i\n if ((fNum*4)+(tNum*2)==Y):\n print("Yes")\n yes = True\n if not (yes):\n print("No")\n \n '] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s323112602', 's726438812', 's728616075'] | [9184.0, 9008.0, 9184.0] | [25.0, 25.0, 23.0] | [271, 139, 276] |
p02640 | u668350270 | 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 = [int(n) for n in input().split()]\n\nfor a in range(x+1):\n for b in range(x-a, x+1):\n legs = 2 * a + 4 * b\n if legs == y:\n print('YES')\n exit()\nprint('NO')\n", "x, y = [int(n) for n in input().split()]\n\nfor a in range(x+1):\n legs = 2 * a + 4 * (x-a)\n if legs == y:\n print('YES')\n exit()\nprint('NO')\n", 'x = [int(n) for n in input().split()]\n\nfor i in range(len(x)):\n if x[i] == 0:\n print(i+1)\n exit()\n', "x, y = [int(n) for n in input().split()]\n\nfor a in range(x+1):\n legs = 2 * a + 4 * (x-a)\n if legs == y:\n print('Yes')\n exit()\nprint('No')\n"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s200703830', 's204306476', 's518581119', 's635146778'] | [9164.0, 9164.0, 9096.0, 9104.0] | [27.0, 21.0, 21.0, 22.0] | [200, 158, 115, 158] |
p02640 | u668750703 | 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 = list(map(int,input().split()))\nfoot=a[0]\nani=a[1]\n\ncrain = (4*ani-foot)/2\nif crain.is_integer() and crain > 0:\n print("Yes")\nelse:\n print("False")', 'a = list(map(int,input().split()))\nX=a[0]\nY=a[1]\n\ncrain = (4*X-Y)/2\nturtle = (Y-2*X)/2\n\nif crain.is_integer() and crain >= 0:\n if turtle.is_integer() and turtle >= 0:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s588577218', 's690549715'] | [9172.0, 9188.0] | [23.0, 22.0] | [156, 242] |
p02640 | u669770320 | 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())\nb = y/2 - x \na = x - b \nif a >=0 and b>= 0:\n print("Yes")\nelse:\n print("No")', 'x , y = map(int,input().split())\nb = y/2 - x \na = x - b \nif a >=0 and b>= 0:\n print("YES")\nelse:\n print("NO")', 'x , y = map(int,input().split())\nb = y/2 - x \na = x - b \nif a >=0 and b>= 0:\n print("YES")\nelse:\n print("NO")', 'x , y = map(int,input().split())\nif y % 2 != 0 :\n print("No")\n quit()\nelse:\n b = y/2 - x\n a = x - b \n if a >= 0 and b >= 0:\n print("Yes")\n else:\n print("No")\n'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s005147414', 's919267609', 's969715498', 's076823147'] | [9008.0, 9172.0, 9164.0, 9048.0] | [22.0, 22.0, 22.0, 22.0] | [119, 115, 115, 190] |
p02640 | u671204079 | 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\nif(c>=0 and c%2==0):\n print('YES')\nelse:\n print('NO')", "X,Y = map(int,input().split())\nc = 4*X - Y\nif(c>=0 and c%2==0):\n print('YES')\nelse:\n print('NO')", "X,Y =map(int, input().split())\n\nif (X>=Y or Y%2 or Y>4*X or Y<2*X):\n print('No')\nelif(Y<=4*X and Y>=2*X)\n print('Yes')\n", "X,Y =map(int, input().split())\n\nif (X>=Y or Y%2 or Y>4*X or Y<2*X):\n print('No')\nelif(Y<=4*X and Y>=2*X):\n print('Yes')\n"] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s279337336', 's651981526', 's677780463', 's199669739'] | [9168.0, 9168.0, 9028.0, 9156.0] | [22.0, 21.0, 22.0, 20.0] | [98, 98, 121, 122] |
p02640 | u680503348 | 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 re\nimport sys\nfrom bisect import bisect, bisect_left, insort, insort_left\nfrom collections import Counter, defaultdict, deque\nfrom copy import deepcopy\nfrom decimal import Decimal\nfrom itertools import (\n accumulate, combinations, combinations_with_replacement, groupby,\n permutations, product)\nfrom math import (acos, asin, atan, ceil, cos, degrees, factorial, gcd, hypot,\n log2, pi, radians, sin, sqrt, tan)\nfrom operator import itemgetter, mul\nfrom string import ascii_lowercase, ascii_uppercase, digits\n\n\ndef inp():\n return(int(input()))\n\n\ndef inlist():\n return(list(map(int, input().split())))\n\n\ndef instr():\n s = input()\n return(list(s[:len(s)]))\n\n\ndef invr():\n return(map(int, input().split()))\n\n\na, b = invr()\nres = "NO"\nfor i in range(a+1):\n if i*2 + (a-i)*4 == b:\n res = "YES"\n break\nprint(res)\n', 'import re\nimport sys\nfrom bisect import bisect, bisect_left, insort, insort_left\nfrom collections import Counter, defaultdict, deque\nfrom copy import deepcopy\nfrom decimal import Decimal\nfrom itertools import (\n accumulate, combinations, combinations_with_replacement, groupby,\n permutations, product)\nfrom math import (acos, asin, atan, ceil, cos, degrees, factorial, gcd, hypot,\n log2, pi, radians, sin, sqrt, tan)\nfrom operator import itemgetter, mul\nfrom string import ascii_lowercase, ascii_uppercase, digits\n\n\ndef inp():\n return(int(input()))\n\n\ndef inlist():\n return(list(map(int, input().split())))\n\n\ndef instr():\n s = input()\n return(list(s[:len(s)]))\n\n\ndef invr():\n return(map(int, input().split()))\n\n\na, b = invr()\nres = "No"\nfor i in range(a+1):\n\n if i*2 + (a-i)*4 == b:\n res = "Yes"\n break\nprint(res)\n'] | ['Wrong Answer', 'Accepted'] | ['s933762780', 's020908089'] | [10548.0, 10548.0] | [32.0, 29.0] | [867, 868] |
p02640 | u681426836 | 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*x and (x+y)%2==0:\n print("yes")\nelse:\n print("no")', 'x,y=map(int,input().split())\nif 2*x<=y<=4*x and y%2==0:\n print("yes")\nelse:\n print("no")', 'x,y=map(int,input().split())\nif 2*x<=y<=4*x and y%2==0:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s060333028', 's644236786', 's776102244'] | [9168.0, 9104.0, 9164.0] | [23.0, 18.0, 20.0] | [98, 94, 94] |
p02640 | u682271925 | 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, y = map(int,input().split())\n fm1 = y - 2 * x\n fm2 = 4 * x - y\n if y % 2 == 0 and fm1 >= 0 and fm2 >= 0:\n print("YES")\n else:\n print("NO")\n\n\nif __name__ == \'__main__\':\n main()', 'def main():\n x, y = map(int,input().split())\n fm1 = y - 2 * x\n fm2 = 4 * x - y\n if y % 2 == 0 and fm1 >= 0 and fm2 >= 0:\n print("Yes")\n else:\n print("No")\n\n\nif __name__ == \'__main__\':\n main()'] | ['Wrong Answer', 'Accepted'] | ['s081766536', 's479014210'] | [9160.0, 9172.0] | [24.0, 21.0] | [204, 204] |
p02640 | u688219499 | 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 - 4 * x) % 2 ==1:\n print("No")\nelif (y - 4 * x) // 2 <= x and y - 4 * x >=0:\n print("Yes")\nelse:\n print("No")', 'x,y = map(int,input().split())\nfor i in range(x+1):\n if i * 2 + (x - i) * 4 ==y:\n print("Yes")\n exit()\nprint("No") '] | ['Wrong Answer', 'Accepted'] | ['s244085814', 's421851226'] | [9168.0, 9168.0] | [23.0, 20.0] | [155, 132] |
p02640 | u689233188 | 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\nlow = y//4\nhigh = y//2\n\nif low <= x <= high:\n print("YES")\nelse:\n print("NO")', 'x, y = map(int, input().split())\n\nhigh = x*4\nlow = x*2\n\nif low <= y <= high and y % 2 == 0:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s946040587', 's851537906'] | [9068.0, 9104.0] | [27.0, 27.0] | [117, 130] |
p02640 | u689944555 | 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 = list(map(int, input().split()))\nX =a[0]\nY =a[1]\nfor n in range(X+1):\n for i in range(X+1):\n if 2*n+4*i ==Y and n +i <=X:\n print("YES")\n break\n else:\n continue\n break\nelse:\n print("NO")', 'a = list(map(int, input().split()))\nX =a[0]\nY =a[1]\nfor n in range(X+1):\n if 4*X-2*n ==Y :\n print("Yes")\n break\nelse:\n print("No")\n '] | ['Wrong Answer', 'Accepted'] | ['s524634098', 's391161655'] | [9176.0, 9176.0] | [23.0, 22.0] | [236, 163] |
p02640 | u691531343 | 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 numpy as np\n\n\nMODE = 1\n\n\nDIMENSION = 1\n\n\nINT_TYPE = 1\n\nif not (MODE):\n with open("input.txt", "r") as f:\n s = f.read()\nelse:\n s = sys.stdin.read()\n\nif DIMENSION == 0:\n if INT_TYPE == 1:\n s = int(s)\nelif DIMENSION == 1:\n if INT_TYPE == 0:\n s = s.split()\n elif INT_TYPE == 1:\n s = [int(x) for x in s.split()]\nelif DIMENSION == 2:\n if INT_TYPE == 0:\n s = [x.split() for x in s.splitlines()]\n elif INT_TYPE == 1:\n s = [[int(y) for y in x.split()] for x in s.splitlines()]\n\nx, y = s\na = y - 2 * x\nb = 4 * x - y\nif a % 2 == 0 and b % 2 == 0 and a >= 0 and b >= 0:\n print("YES")\nelse:\n print("NO")\n', 'import sys\nimport numpy as np\n\n\nMODE = 1\n\n\nDIMENSION = 1\n\n\nINT_TYPE = 1\n\nif not (MODE):\n with open("input.txt", "r") as f:\n s = f.read()\nelse:\n s = sys.stdin.read()\n\nif DIMENSION == 0:\n if INT_TYPE == 1:\n s = int(s)\nelif DIMENSION == 1:\n if INT_TYPE == 0:\n s = s.split()\n elif INT_TYPE == 1:\n s = [int(x) for x in s.split()]\nelif DIMENSION == 2:\n if INT_TYPE == 0:\n s = [x.split() for x in s.splitlines()]\n elif INT_TYPE == 1:\n s = [[int(y) for y in x.split()] for x in s.splitlines()]\n\nx, y = s\na = y - 2 * x\nb = 4 * x - y\nif a % 2 == 0 and b % 2 == 0 and a >= 0 and b >= 0:\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Accepted'] | ['s389260372', 's713392376'] | [27144.0, 27144.0] | [102.0, 107.0] | [747, 747] |
p02640 | u692054751 | 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. | ["#!/usr/bin/env python3\n\nX, Y = [int(s) for s in input().split()]\n\nif Y % 2 != 0:\n print('No')\n exit()\n\nlow = Y // 4 + (Y % 4 != 0)\nhigh = Y // 2\n\nprint(low, high)\n\nif low <= X <= high:\n print('Yes')\nelse:\n print('No')\n", "#!/usr/bin/env python3\n\nX, Y = [int(s) for s in input().split()]\n\nif Y % 2 != 0:\n print('No')\n exit()\n\nlow = Y // 4 + (Y % 4 != 0)\nhigh = Y // 2\n\nif low <= X <= high:\n print('Yes')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s356748312', 's005331284'] | [9176.0, 9168.0] | [20.0, 22.0] | [230, 212] |
p02640 | u694536861 | 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 (1 <= X <= 100) and (1 <= Y <= 100):\n if isinstance(( Y - X ) / 2, int) and isinstance((Y - X) / -2, int)\n \tprint("Yes")\n else:\n print("No")', 'X, Y = map(int, input().split())\n \nif (1 <= X <= 100) and (1 <= Y <= 100):\n kame = ( Y - (2 * X)) / 2\n turu = (Y - (4 * X)) / -2\n \n if kame.is_integer() and turu.is_integer() and kame >= 0 and turu >= 0:\n \tprint("Yes")\n else:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s414529966', 's149768099'] | [8784.0, 9144.0] | [29.0, 29.0] | [183, 247] |
p02640 | u694951525 | 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())\nfor i in range(X+1):\n j = X - i\n if 2*i+4*j == Y:\n print(\'Yes\')\n sys.exit()\nprint(\'No")', "import sys\nX, Y = map(int, input().split())\nfor i in range(X+1):\n j = X - i\n if 2*i+4*j == Y:\n print('Yes')\n sys.exit()\nprint('No')"] | ['Runtime Error', 'Accepted'] | ['s768239170', 's313434230'] | [8956.0, 9164.0] | [23.0, 30.0] | [139, 139] |
p02640 | u695261159 | 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(0,X+1):\n print(i)\n if i*2 + (X-i)*4 == Y:\n print('Yes')\n exit()\nprint('No')\n", "X,Y = map(int, input().split())\n\nfor i in range(1,X+1):\n if i*2 + (X-i)*4 == Y:\n print('YES')\n exit()\nprint('NO')\n", "X,Y = map(int, input().split())\n\nfor i in range(0,X+1):\n if i*2 + (X-i)*4 == Y:\n print('Yes')\n exit()\nprint('No')\n"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s380134107', 's407237757', 's905546170'] | [9160.0, 9160.0, 9152.0] | [21.0, 23.0, 21.0] | [144, 131, 131] |
p02640 | u695329583 | 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\nfor b in range(x+1) :\n for t in range(x+1,0,-1) :\n if x == b+t and y == 2*b+4*t :\n print('Yes')\n break\n else :\n cnt += 1\n if cnt == (x+1)*3 :\n print('No')\n else :\n continue", "x,y = map(int,input().split())\ncnt = 0\nfor b in range(x+1) :\n for t in range(x+1) :\n if x == b+t and y == 2*b+4*t :\n print('Yes')\n exit()\n else :\n continue\nprint('No')"] | ['Wrong Answer', 'Accepted'] | ['s846253318', 's072158311'] | [9168.0, 9136.0] | [28.0, 26.0] | [313, 217] |
p02640 | u696684809 | 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())\na = -y+4x\nb = y-2x\nif(a%2==0 and b%2==0):\n print("Yes")\nelse:\n print("No")', 'x,y = map(int, input().split())\na = -y+4*x\nb = y-2*x\nif(a%2==0 and b%2==0 and a>=0 and b>=0):\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Accepted'] | ['s933676428', 's016909678'] | [9008.0, 8932.0] | [24.0, 28.0] | [107, 129] |
p02640 | u697953988 | 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. | ['animals,legs= map(int,input().split())\nif legs%2 !=0 or animals*2>legs or animals*4<legs: print("no")\nelse: print("yes")\n', 'animals,legs= map(int,input().split())\nif animals%2 !=0 or animals*2>legs or animals*4<legs: print("no")\nelse: print("yes")\n', 'animals,legs= map(int,input().split())\nif legs%2 !=0 or animals*2>legs or animals*4<legs: print("No")\nelse: print("Yes")\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s168936809', 's751365068', 's814875102'] | [9080.0, 9072.0, 9100.0] | [29.0, 26.0, 27.0] | [121, 124, 121] |
p02640 | u698756732 | 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 4 * x < y:\n print("NO")\nelse:\n if y % 2 == 0:\n print("YES")\n else:\n print("NO")', 'x,y = list(map(int, input("").split()))\n\nif 4 * x < y:\n print("No")\nelse:\n if 2 * x <= y:\n if y % 2 == 0:\n print("Yes")\n else:\n print("No")\n else:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s508671085', 's162097815'] | [9168.0, 9176.0] | [22.0, 24.0] | [146, 211] |
p02640 | u699008198 | 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\nret = True\nif 4 * X - Y % 2 != 0:\n ret = False\nif 4 * X - Y % 2 < 0:\n ret = False\nif Y - 2 * X % 2 != 0:\n ret = False\nif Y - 2 * X < 0:\n ret = False\nif ret:\n print("Yes")\nelse:\n print("No")\n', 'X, Y = map( int, input().split() )\n \nret = True\nif (4 * X - Y) % 2 == 1:\n ret = False\nif 4 * X - Y < 0:\n ret = False\nif (Y - 2 * X) % 2 == 1:\n ret = False\nif Y - 2 * X < 0:\n ret = False\nif ret:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s559809727', 's709435218'] | [9172.0, 9188.0] | [21.0, 22.0] | [234, 234] |
p02640 | u700825859 | 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 4*x-y % 2 == 0 and 4*x-y >= 0 and -2*x+y >= 0:\n print("Yes")\nelse :\n print("No")', 'x,y = map(int, input().split())\nif (4*x-y) % 2 == 0 and (4*x-y) >= 0 and (-2*x+y) >= 0:\n print("Yes")\nelse :\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s357702784', 's383120790'] | [9168.0, 9128.0] | [19.0, 23.0] | [117, 123] |
p02640 | u702018889 | 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*2>y:\n print('No')\nelse:\n if y%2==1 :\n print('No')\nelse:\n if x*4<y :\n print('No')\nelse:\n print('Yes')", "x,y=map(int,input().split())\nif x*2>y:\n print('No')\nelse:\n if y%2==1 :\n print('No')\n else:\n if x*4<y :\n print('No')\n else:\n print('Yes')"] | ['Runtime Error', 'Accepted'] | ['s575618325', 's786879865'] | [8824.0, 9132.0] | [25.0, 31.0] | [148, 160] |
p02640 | u706377526 | 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 sympy\nx = sympy.Symbol(\'x\')\ny = sympy.Symbol(\'y\')\n\ns = input()\nlst = s.split()\n\nex1 = x + y - int(lst[0])\nex2 = 2 * x + 4 * y - int(lst[1])\n\nd = sympy.solve([ex1, ex2])\n\nif d[x] >= 0 and d[y] >= 0:\n print("yes")\nelse:\n print("no")\n\n', 's = input()\nlst = s.split()\n\nex1 = int(lst[0])\nex2 = int(lst[1])\nret = "no"\n\nfor i in range(ex1+1):\n if 4 * (ex1 - i) + 2 * i == ex2:\n ret= "yes"\n\nprint(ret)\n', 's = input()\nlst = s.split()\n\nex1 = int(lst[0])\nex2 = int(lst[1])\nret = "No"\n\nfor i in range(ex1+1):\n if 4 * (ex1 - i) + 2 * i == ex2:\n ret= "Yes"\n\nprint(ret)\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s169684529', 's596836110', 's737118194'] | [9124.0, 9200.0, 9172.0] | [26.0, 21.0, 24.0] | [245, 168, 168] |
p02640 | u707567014 | 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())\nleg = 0\nfor i in range(2**a):\n leg = 0\n for j in range(a):\n if (i & 1 <<j):\n leg +=4\n else:\n leg +=2\n print(leg)\n if leg == b:\n print('Yes')\n exit()\nprint('No')", "a,b = map(int,input().split())\nleg = 0\nfor i in range(0,a+1):\n if 2*i +4*(a-i) == b:\n print('Yes')\n exit()\nprint('No')\n\n"] | ['Wrong Answer', 'Accepted'] | ['s100568684', 's255082510'] | [9248.0, 9168.0] | [2206.0, 29.0] | [254, 138] |
p02640 | u712315567 | 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 print(a)\n a = a + 1\n b = x - a\n if 2 * a + 4 * b == y:\n print('Yes')\n break\nelse:\n print('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 break\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s128927869', 's589047984'] | [9168.0, 9168.0] | [20.0, 23.0] | [179, 152] |
p02640 | u713399713 | 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())\na = 0\nb = X - a\nfor i in range(X+1):\n a = i\n b = X - a\n if a * 2 + b * 4 == Y:\n print("YES")\n elif b == 0:\n print("NO")', 'X, Y = map(int, input().split())\na = 0\nb = X - a\nfor i in range(X+1):\n a = i\n b = X - a\n if a * 2 + b * 4 == Y:\n print("YES")\n break\n elif b == 0:\n print("NO")', 'X, Y = map(int, input().split())\na = 0\nb = X - a\nfor i in range(X+1):\n a = i\n b = X - a\n if a * 2 + b * 4 == Y:\n print("Yes")\n break\n elif b == 0:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s344457374', 's351219360', 's470286970'] | [9172.0, 9196.0, 9172.0] | [24.0, 26.0, 24.0] | [194, 204, 204] |
p02640 | u714931250 | 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 tu = i\n cr = x - i\n ch = tu*4 + cr*2\n print(i,ch)\n if ch == y:\n ans = 'Yes'\n break\nprint(ans)", "x,y = map(int,input().split())\nans = 'No'\nfor i in range(x+1):\n tu = i\n cr = x - i\n ch = tu*4 + cr*2\n if ch == y:\n ans = 'Yes'\n break\nprint(ans)"] | ['Wrong Answer', 'Accepted'] | ['s197631918', 's981748070'] | [9176.0, 9176.0] | [30.0, 30.0] | [168, 154] |
p02640 | u715213082 | 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())\n\nt = b//a\nif a ==1 and b == 1:\n print("NO")\nelif a == 1 and b ==2:\n print("YES")\nelif t <= a:\n print("YES")\nelse:\n print("NO")\n', '#from itertools import Combinations\na,b = map(int,input().split())\nx = \'No\'\nfor i in range(a+1):\n t = a - i\n if 2 * i + 4 * t == b:\n x = "Yes"\nprint(x)\n'] | ['Wrong Answer', 'Accepted'] | ['s264514678', 's683430258'] | [9172.0, 9148.0] | [21.0, 30.0] | [169, 165] |
p02640 | u716159461 | 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())\ncrain = (4 * X - Y) / 2\nif crain.is_integer() and crain > 0:\n crain = int(crain)\n print("yes")\nelse:\n print("no")', 'X=int(input())\nY=int(input())\n\ncrain=(4*X-Y)/2\nif crain.is_integer() and crain>0:\n crain = int(crain)\n print("Yes")\nelse:\n print("No")', 'X=input()\nY=input()\ncrain = (4 * X - Y) / 2\nif crain.is_integer() and crain > 0:\n crain = int(crain)\n print("yes")\nelse:\n print("no")', 'X,Y=map(int,input().split())\nq=0\n\nif(Y%2==1):\n q=1\n print("No")\n\nif q==0:\n print(X*2<=Y and Y<=X*4 and "Yes" or "No")'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s597574251', 's620501019', 's626902471', 's677182905'] | [9168.0, 9164.0, 9104.0, 9112.0] | [21.0, 19.0, 20.0, 22.0] | [154, 143, 142, 126] |
p02640 | u720065198 | 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 = y//4\nif 2*(x-a)==y-4*a:\n print("Yes")\nelse:\n print("No")', 'x, y = map(int, input().split())\na = y//4\nif 2*(x-a)==y-4*a:\n print("Yes")\nelse:\n print("No")', 'a = y//4\nif 2*(x-a)==y-4*a:\n print("YES")\nelse:\n print("NO")', 'x, y = map(int, input().split())\nn = (4*x-y)/2\nm = (y-2*x)/2\nif y%2 ==1:\n print("No")\nelse:\n if n <0 or m <0:\n print("No")\n else:\n if n+m==x and 2*n+4*m==y:\n print("Yes")\n else:\n print("No")'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s522923829', 's556711274', 's651926896', 's396279656'] | [8956.0, 9168.0, 9088.0, 9188.0] | [21.0, 24.0, 21.0, 23.0] | [62, 95, 62, 212] |
p02640 | u720483676 | 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 :\n print("No")\nelif 4 * x < y:\n print("No")\nelif y % 2 != 1:\n print("No")\nelse:\n print("Yes")\n \n', 'x, y = map(int, input().split())\nif y<2 * x :\n print("No")\nelif 4 * x < y:\n print("No")\nelif y % 2 == 1:\n print("No")\nelse:\n print("Yes")\n \n'] | ['Wrong Answer', 'Accepted'] | ['s427780848', 's431439705'] | [9160.0, 9160.0] | [23.0, 21.0] | [155, 155] |
p02640 | u726285999 | 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, sys.stdin.readline().split())\n\nfor x in range(X+1):\n kame = x\n tsuru = X - x\n \n y = kame * 4 + tsuru * 2\n print(kame, tsuru, y)\n if y==Y:\n print("Yes")\n break\nelse:\n print("No")', 'import sys\n\nX, Y = map(int, sys.stdin.readline().split())\n\nfor x in range(X+1):\n kame = x\n tsuru = X - x\n \n if kame*4+tsuru*2==Y:\n print("yes")\n break\nelse:\n print("no")', 'import sys\n\nX, Y = map(int, sys.stdin.readline().split())\n\nfor x in range(X+1):\n kame = x\n tsuru = X - x\n \n y = kame * 4 + tsuru * 2\n \n if y==Y:\n print("Yes")\n break\nelse:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s727832995', 's921837841', 's805148278'] | [9180.0, 9104.0, 9172.0] | [21.0, 22.0, 22.0] | [240, 198, 242] |
p02640 | u726823037 | 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 y = Y//2\nelse:\n print('No')\n exit(0)\n\nif x < y <2*x:\n print('Yes')\nelse:\n print('No')\n\n", "import sys\ndef Ii():return int(sys.stdin.readline())\ndef Mi():return map(int,sys.stdin.readline().split())\ndef Li():return list(map(int,sys.stdin.readline().split()))\n\nx,y = Mi()\nif y%2 == 1:\n print('No')\n exit(0)\n \ny = y//2\n\nif x <= y <= 2*x:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s069300327', 's629900807'] | [9084.0, 9124.0] | [24.0, 27.0] | [137, 281] |
p02640 | u727072969 | 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())\na = 0\nb = 0\nflag = True\nwhile flag:\n for a in range(x+1):\n print(a)\n for b in range(x+1):\n if x - a == b and y - 2*a == 4*b:\n flag = False\n print(a,b,x,y)\n break\n else:\n continue\n break\n\nif flag:\n print("No")\nelse:\n print("Yes")', 'x,y = map(int, input().split())\na = 0\nb = 0\nflag = True\nwhile flag:\n for a in range(x+1):\n print(a)\n for b in range(x+1):\n if x - a == b and y - 2*a == 4*b and b != 0 and a != 0:\n flag = False\n print(a,b,x,y)\n break\n else:\n continue\n break\n\nif flag:\n print("No")\nelse:\n print("Yes")', 'x,y = map(int, input().split())\na = 0\nb = 0\nflag = True\nwhile flag:\n for a in range(x+1):\n for b in range(x+1):\n if x - a == b and y - 2*a == 4*b:\n flag = False\n break\n else:\n continue\n break\n\nif flag:\n print("No")\nelse:\n print("Yes")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s272680582', 's960397955', 's787298259'] | [9200.0, 9196.0, 9188.0] | [23.0, 24.0, 23.0] | [368, 390, 320] |
p02640 | u727717182 | 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\n\ndef main():\n\n input = stdin.readline\n\n X,Y = map(int,input().split())\n\n max_ashi = X * 4\n min_ashi = X * 2\n\n if (Y <= max_ashi) & (min_ashi <= Y) & (Y % 2 == 0):\n print("YES")\n else:\n print("NO")\n\n\nif __name__ == "__main__":\n main()', 'from sys import stdin\n\ndef main():\n\n input = stdin.readline\n\n X,Y = map(int,input().split())\n\n max_ashi = X * 4\n min_ashi = X * 2\n\n if (Y <= max_ashi) & (min_ashi <= Y) & (Y % 2 == 0):\n print("Yes")\n else:\n print("No")\n\n\nif __name__ == "__main__":\n main()'] | ['Wrong Answer', 'Accepted'] | ['s095094864', 's174544904'] | [9180.0, 9176.0] | [22.0, 24.0] | [290, 290] |
p02640 | u729119068 | 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 a in range(1, X):\n if 2*a + 4*(x-a) == Y:\n print("Yes")\n exit()\nprint("No")', 'X, Y = map(int, input().split)\nfor a in range(1, X+1):\n if 2*a + 4*(x-a) == Y:\n print("Yes")\n exit()\nprint("No")', 'X, Y = map(int, input().split())\nfor a in range(X+1):\n if 2*a + 4*(X-a) == Y:\n print("Yes")\n exit()\nprint("No")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s027005385', 's353753024', 's215165545'] | [9108.0, 8988.0, 9116.0] | [28.0, 26.0, 32.0] | [119, 119, 118] |
p02640 | u730807152 | 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+1):\n \n if i*2+(x-i)*4==y:\n print("Yes")\n\nprint("No")', 'x,y=map(int,input().split())\n\nfor i in range(x+1):\n \n if i*2+(x-i)*4==y:\n print("Yes")\n exit()\nprint("No")'] | ['Wrong Answer', 'Accepted'] | ['s230358197', 's924362209'] | [9156.0, 9168.0] | [21.0, 24.0] | [112, 126] |
p02640 | u731467249 | 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\nfor i in range(1, n+1):\n f = 2 * i + 4 * (n - i)\n if f == m:\n print('Yes')\n break\n \n else:\n print('No')", "n, m = map(int, input().split())\n\nfor i in range(n+1):\n f = 2 * i + 4 * (n - i)\n if f == m:\n print('Yes')\n break\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s340955260', 's711538293'] | [9176.0, 9164.0] | [21.0, 28.0] | [170, 154] |
p02640 | u732832001 | 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. | ['all, leg = map(int, input().split())\n\nif 2 > leg / all or leg / all > 4 or leg % 2 == 1:\n print("NO")\nelse:\n print("YES")\n', 'all, leg = map(int, input().split())\n\nif 2 > leg / all or leg / all > 4 or leg % 2 == 1:\n print("No")\nelse:\n print("Yes")\n'] | ['Wrong Answer', 'Accepted'] | ['s641169485', 's945539842'] | [9180.0, 9120.0] | [22.0, 21.0] | [124, 124] |
p02640 | u733011130 | 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\nreadline = sys.stdin.readline\n\ndef solve():\n X, Y = map(int, readline().split())\n\n Y - X * 2 = a\n\n if a >= 0 and a % 2 == 0:\n print('Yes')\n else:\n print('No')\n\nsolve()", "import sys\nreadline = sys.stdin.readline\n\ndef solve():\n X, Y = map(int, readline().split())\n\n a = Y - X * 2\n\n if a >= 0 and a % 2 == 0 and a // 2 <= X:\n print('Yes')\n else:\n print('No')\n\nsolve()"] | ['Runtime Error', 'Accepted'] | ['s487390571', 's468429615'] | [8960.0, 9160.0] | [26.0, 20.0] | [204, 220] |
p02640 | u733132703 | 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+1):\n for j in range(X+1):\n if 2*i+4*j==Y and i+j == X:\n print('Yes')\n break\n elif i == X and j == X:\n print('No')\n \n ", "import sys\nX,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 sys.exit()\n elif i == X and j == X:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s116712322', 's654076528'] | [9104.0, 9176.0] | [22.0, 21.0] | [196, 202] |
p02640 | u733866054 | 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%==0) and (2*x<=y<=4*x) :\n print("Yes")\nelse :\n print("No")', 'x,y=map(int,input().split()) \np=(y-2x)/2\nif int(p) and 1<=p<=100 :\n print("Yes")\nelse :\n print("No")', 'x,y=map(int,input().split()) \n \nif (y%2==0) and (2*x<=y<=4*x) :\n print("Yes")\nelse :\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s211869157', 's730821423', 's131192658'] | [8768.0, 8932.0, 9048.0] | [27.0, 24.0, 28.0] | [102, 107, 104] |
p02640 | u734252743 | 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 = \'No\'\n\nfor i in range(x + 1):\n j = x - a\n if (j*2 + i*4 == y):\n ans = "Yes"\nprint(ans)\n', 'x, y = map(int, input().split())\n\nans = \'No\'\n\nfor i in range(x + 1):\n j = x - a\n if (j*2 + i*4 == y):\n ans = "Yes"):\nprint(ans)\n', 'x, y = map(int, input().split())\n\nans = \'No\'\n\nfor i in range(x + 1):\n j = x - i\n if (j*2 + i*4 == y):\n ans = "Yes"\nprint(ans)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s590185640', 's696590651', 's615931907'] | [9164.0, 9028.0, 9148.0] | [19.0, 23.0, 23.0] | [139, 141, 139] |
p02640 | u734936991 | 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) = [int(s) for s in input().split()]\n\n\nans = 'NO'\nif 2 * x <= y <= 4 * x and y % 2 == 0:\n ans = 'YES'\n\nprint(ans)\n", "(x, y) = [int(s) for s in input().split()]\n\nans = 'No'\nif 2 * x <= y <= 4 * x and y % 2 == 0:\n ans = 'Yes'\n\nprint(ans)\n"] | ['Wrong Answer', 'Accepted'] | ['s614936490', 's737336052'] | [9164.0, 9156.0] | [21.0, 23.0] | [123, 122] |
p02640 | u735355352 | 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 + 1):\n if 2 * i + 4 * (x - i) == y:\n print("Yes")\n break\n else:\n print("No")', 'x, y = map(int, input().split())\nfor i in range(x + 1):\n if 2 * (x - i) + 4 * i == y:\n print("Yes")\n break\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s746348116', 's481403331'] | [9020.0, 9044.0] | [27.0, 25.0] | [153, 145] |
p02640 | u736443076 | 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()))\nans = y / 2 - x \nif ans % 2 != 0:\n print("No")\nelif x == y or x >= y or ans >= x:\n print("No")\nelif ans <= x:\n print("Yes")', 'x, y = list(map(int,input().split()))\nans = y / 2 - x \nif y % 2 == 0:\n print("No")\nelif ans <= x:\n print("Yes")\nelse:\n print("No")\n', 'x, y = list(map(int,input().split()))\nans = y / 2 - x \nif ans % 2 != 0:\n print("No")\nelif ans <= x:\n print("Yes")\nelse:\n print("No")\n', "x, y = map(int, input().split())\nif y % 2 == 0 and 2 * x <= y <= 4 * x:\n print('Yes')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s280120482', 's470193082', 's957258712', 's640363859'] | [9180.0, 9160.0, 9228.0, 9160.0] | [23.0, 22.0, 23.0, 30.0] | [170, 140, 142, 111] |
p02640 | u736757761 | 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=input()\ny=input()\nif 2*x <= y <= 4*x and y%2 == 0:\n print("Yes")\nelse:\n print("No")', 'x=input()\ny=input()\nif 2*x <= y <= 4*x and y%2 == 0:\n print("Yes")\nelse:\n print("No")', 'S = input( ).split( )\nx = int(S[0])\ny = int(S[1])\nif 2*x <= y <= 4*x and y%2 == 0:\n print("Yes")\nelse: print("No")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s130863232', 's648121354', 's905328566'] | [9100.0, 8960.0, 9156.0] | [23.0, 26.0, 25.0] | [91, 87, 115] |
p02640 | u738289281 | 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 = input()\nb = a.split(" ")\nx, y = int(b[0]), int(b[1])\nif x * 2 <= y <= x * 4:\n print("yes")\nelse:\n print("no")\n', 'a = input()\nb = a.split(" ")\nx, y = int(b[0]), int(b[1])\nif x * 2 <= y <= x * 4 and y % 2 == 0:\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Accepted'] | ['s224371465', 's847845570'] | [9152.0, 9084.0] | [29.0, 28.0] | [120, 135] |
p02640 | u742729271 | 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 yi=2*i+4(x-i)\n if y==yi:\n flag=True\n break\n \nprint("Yes") if flag else print("No")', 'x, y = map(int,input().split())\nflag=False\nfor i in range(x+1):\n yi=2*i+4*(x-i)\n if y==yi:\n flag=True\n break\n \nprint("Yes") if flag else print("No")\n'] | ['Runtime Error', 'Accepted'] | ['s836374615', 's397732159'] | [9176.0, 9164.0] | [21.0, 23.0] | [158, 160] |
p02640 | u744493670 | 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=0\nif(y>4*x):\n print("NO")\nelif(y==2*x or y==4*x):\n print("YES")\nelse: \n for i in range(x+1):\n j=x-i\n if((2*i+4*j)==y):\n print("YES")\n break\n else:\n t=t+1\n if(t==x+1):\n print("NO")', 'x,y=map(int,input().split())\nt=0\nif(y>4*x):\n print("NO")\nelif(y==2*x or y==4*x):\n print("YES")\nelif(y%2!=0):\n print("NO")\nelse: \n for i in range(1,x):\n j=x-i\n if((2*i+4*j)==y):\n print("YES")\n break\n else:\n t=t+1\n if(t==x-1):\n print("NO")\n', 'x,y=map(int,input().split())\nt=0\nif(y>4*x or y<2*x):\n print("No")\nelif(y==2*x or y==4*x):\n print("Yes")\nelif(y%2!=0):\n print("No")\nelse: \n for i in range(1,x):\n j=x-i\n if((2*i+4*j)==y):\n break\n else:\n t=t+1\n if(t==x-1):\n print("No")\n else:\n print("Yes")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s584915227', 's801935358', 's484628817'] | [9196.0, 9196.0, 9208.0] | [21.0, 24.0, 21.0] | [242, 273, 289] |
p02640 | u745223262 | 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. | ['pyenv shell 3.8.0\ndyld: Library not loaded: /usr/local/opt/libevent/lib/libevent-2.1.6.dylib\n Referenced from: /usr/local/bin/tmux\n Reason: image not found\n[2] 51266 abort tmux\n% pyenv shell 3.8.0 ~/Documents/sub-programming/atcoder\npyenv: shell integration not enabled. Run `pyenv init\' for instructions.\n% python 170a.py ~/Documents/sub-programming/atcoder\n0 2 3 4 5\nTraceback (most recent call last):\n File "170a.py", line 3, in <module>\n if h[i] == 0:\nIndexError: list index out of range\n% python 170a.py ~/Documents/sub-programming/atcoder\n0 2 3 4 5\n1\n% python ~/Documents/sub-programming/atcoder\nPython 3.8.0 (default, Dec 6 2019, 13:22:27) \n[Clang 8.0.0 (tags/RELEASE_800/final)] on darwin\nType "help", "copyright", "credits" or "license" for more information.\n>>> int(2,1)\nTraceback (most recent call last):\n File "<stdin>", line 1, in <module>\nValueError: int() base must be >= 2 and <= 36, or 0\n>>> int(2.1)\n2\n>>> int(2.4)\n2\n>>> type(2.1)\n<class \'float\'>\n>>> math.ceil(2.1)\nTraceback (most recent call last):\n File "<stdin>", line 1, in <module>\nNameError: name \'math\' is not defined\n>>> 1.ceil()\n File "<stdin>", line 1\n 1.ceil()\n ^\nSyntaxError: invalid syntax\n>>> \nKeyboardInterrupt\n>>> eix\nTraceback (most recent call last):\n File "<stdin>", line 1, in <module>\nNameError: name \'eix\' is not defined\n>>> exit\nUse exit() or Ctrl-D (i.e. EOF) to exit\n>>> \n% python 170b.py ~/Documents/sub-programming/atcoder\n File "170b.py", line 5\n print(\'Yes\'):\n ^\nSyntaxError: invalid syntax\n% python 170b.py ~/Documents/sub-programming/atcoder\n3 8\nYes\n% ~/Documents/sub-programming/atcoder', "import math\nx, y = map(int, input().split())\na = (4 * x - y) / 2\nif a >= 0 and a <= x and a == math.ceil(a):\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s060519579', 's434892455'] | [8940.0, 8832.0] | [23.0, 21.0] | [2024, 147] |
p02640 | u747391638 | 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(" "))\nz = y/2-x\nif z>=0 and z<=x:\n print("yes")\nelse:\n print("no")', 'x,y = map(int, input().split(" "))\nz = y/2-x\nif z>=0 and z<=x and z%1==0:\n print("yes")\nelse:\n print("no")', 'x,y = map(int, input().split(" "))\nz = y/2-x\nif z>=0 and z<=x and z%1==0:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s113879928', 's116896518', 's206199894'] | [9100.0, 9168.0, 9228.0] | [22.0, 24.0, 23.0] | [97, 108, 108] |
p02640 | u749614185 | 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())\nA='No'\nfor a in range(X+1):\n B=X-1\n if 2*a+4*B == Y\n \tA='Yes'\nprint(A)", '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")\n'] | ['Runtime Error', 'Accepted'] | ['s072740034', 's611199768'] | [8884.0, 9148.0] | [24.0, 28.0] | [107, 101] |
p02640 | u749643742 | 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())\n\nif (y-2*x)/2 <= x:\n print('Yes')\nelse:\n print('No')", 'import sys\nx,y=map(int,input().split())\nfor i in range(x+1):\n if i*2+(x-i)*4==y:\n print("Yes")\n sys.exit(0)\nprint("No")\n'] | ['Runtime Error', 'Accepted'] | ['s634250100', 's581061843'] | [9092.0, 8956.0] | [23.0, 23.0] | [88, 127] |
p02640 | u749947386 | 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. | ['xin = input().split()\nx = list(map(int, xin))\n\na = x[0]*2 - x[1]/2\nb = -x[0]/2 + x[1]/2\n\nif a>=0 and b>= 0:\n\tif(isinstance(a, int) and isinstance(b, int)):\n\t\tprint("yes")\n\telse:\n\t\tprint("no")\nelse:\n\tprint("no")\n\t \n', 'xin = input().split()\nx = list(map(int, xin))\n\na = x[0]*2 - x[1]/2\nb = -x[0]/2 + x[1]/2\n\nif a>=0 and b>= 0:\n\tif(isinstance(a, int) and isinstan(b, int)):\n\t\tprint("yes")\n\telse:\n\t\tprint("no")\nelse:\n\tprint("no")\n\t \n', 'xin = input().split()\nx = list(map(int, xin))\n\na = x[0]*2 - x[1]/2\nb = -x[0]/2 + x[1]/2\n\nif a>=0 and b>= 0:\n\tif(a.isinteger() and b.isinteger()):\n\t\tprint("yes")\n\telse;\n\t\tprint("no")\nelse:\n\tprint("no")\n\t \n', 'xin = input().split()\nx = list(map(int, xin))\n\na = x[0]*2 - x[1]/2\nb = -x[0] + x[1]/2\n\nif (a>=0 and b>= 0):\n\tif(a.is_integer() and b.is_integer()):\n\t\tprint("yes")\n\telse:\n\t\tprint("no")\nelse:\n\tprint("no")\n\t ', 'x = list(map(int, xin))\n\na = x[0]*2 - x[1]/2\nb = -x[0]/2 + x[1]/2\n\nif a>=0 and b>= 0:\n\tprint("yes")\nelse:\n\tprint("no")', 'xin = input().split()\nx = list(map(int, xin))\n\na = x[0]*2 - x[1]/2\nb = -x[0] + x[1]/2\n\nif (a>=0 and b>= 0):\n\tif(a.is_integer() and b.is_integer()):\n\t\tprint("Yes")\n\telse:\n\t\tprint("No")\nelse:\n\tprint("No")\n\t '] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s108325671', 's161844728', 's512288819', 's799025616', 's965848615', 's596048642'] | [9120.0, 8972.0, 8944.0, 9112.0, 8992.0, 9168.0] | [28.0, 29.0, 28.0, 29.0, 27.0, 25.0] | [214, 212, 204, 205, 118, 205] |
p02640 | u755180064 | 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, y = list(map(int, input().split()))\n\n for i in range(0, x+1):\n if i * 2 + x-1 * 4 == y or i * 4 + x-i * 2 == y:\n print('Yes')\n exit()\n print('No')\n\n\nif __name__ == '__main__':\n main()", "def main():\n x, y = list(map(int, input().split()))\n\n for i in range(0, x+1):\n if i * 2 + x-1 * 4 == y or x-i * 4 + i * 2 == y:\n print('Yes')\n exit()\n print('No')\n\n\nif __name__ == '__main__':\n main()", "def main():\n x, y = list(map(int, input().split()))\n\n for i in range(0, x+1):\n if i * 2 + x-i * 4 == y or x-i * 4 + i * 2 == y:\n print('Yes')\n exit()\n print('No')\n\n\nif __name__ == '__main__':\n main()", "def main():\n x, y = list(map(int, input().split()))\n\n for i in range(0, x+1):\n if i * 2 + (x-i) * 4 == y or (x-i) * 4 + i * 2 == y:\n print('Yes')\n exit()\n print('No')\n\n\nif __name__ == '__main__':\n main()"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s107373227', 's443561392', 's826613563', 's663940508'] | [9180.0, 9184.0, 9116.0, 9180.0] | [21.0, 22.0, 24.0, 23.0] | [240, 240, 240, 244] |
p02640 | u755989869 | 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\ndef S(): return sys.stdin.readline().rstrip()\ndef I(): return int(sys.stdin.readline().rstrip())\ndef LI(): return list(map(int,sys.stdin.readline().rstrip().split()))\ndef LS(): return list(sys.stdin.readline().rstrip().split())\nINF = 1000000000000\n\nx,y = LI()\n\nflg = False\nfor i in range(x+1):\n val = 2 * i + 4 * (x-i)\n if(val == y):\n flg = True\n break\n\nif(flg):\n print('YES')\nelse:\n print('NO')", "import sys\ndef S(): return sys.stdin.readline().rstrip()\ndef I(): return int(sys.stdin.readline().rstrip())\ndef LI(): return list(map(int,sys.stdin.readline().rstrip().split()))\ndef LS(): return list(sys.stdin.readline().rstrip().split())\nINF = 1000000000000\n\nx,y = LI()\n\nflg = False\nfor i in range(x+1):\n val = 2 * i + 4 * (x-i)\n if(val == y):\n flg = True\n break\n\nif(flg):\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s534660781', 's160361730'] | [9196.0, 9200.0] | [22.0, 24.0] | [432, 432] |
p02640 | u756761345 | 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())\ncount = 0\n\nfor a in range(x+1):\n b = x - a\n if y = a * 2 + b * 4:\n count += 1\nif count == 0:\n print("No")\nelse:\n print(\'Yes\')', 'x, y = map(int, input().split())\ncount = 0\n\nfor a in range(x+1):\n b = x - a\n if y == a * 2 + b * 4:\n count += 1\nif count == 0:\n print("No")\nelse:\n print(\'Yes\')\n'] | ['Runtime Error', 'Accepted'] | ['s221127699', 's183671373'] | [9020.0, 9168.0] | [24.0, 18.0] | [165, 167] |
p02640 | u758815106 | 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 X * 4 > Y and Y % 2 == 0:\n print("YES")\nelse:\n print("NO")', 'X, Y = map(int, input().split())\n\nif X * 4 >= Y and Y % 2 == 0 and X * 2 <= Y:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s386657883', 's696840297'] | [9156.0, 9156.0] | [20.0, 24.0] | [101, 117] |
p02640 | u759465878 | 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())\ni = 0\nwhile i<=a:\n turu = 2*(a-i)\n kame = 4*i\n \n if b == turu:\n print('YES')\n \n if b == kame:\n print('YES')\n \n amari = b - turu\n if amari == 0:\n print('YES')\n break\n\n if kame !=0:\n if amari % kame == 0:\n print('YES')\n break\n \n i = i + 1\n \nelse:\n print('No)", "a,b = map(int, input().split())\ni = 0\nwhile i<=a:\n turu = 2*(a-i)\n kame = 4*i\n amari = b - turu\n \n if b == turu:\n print('YES')\n \n if b == kame:\n print('YES')\n \n \n if amari == 0:\n print('YES')\n break\n\n if kame!=0:\n if amari % kame == 0:\n print('YES')\n break\n \n i = i + 1\n \nelse:\n print('No')", "a,b = map(int, input().split())\ni = 0\nwhile i<=a:\n turu = 2*(a-i)\n kame = 4*i\n \n if b == turu:\n print('YES')\n break\n \n if b == kame:\n print('YES')\n break\n \n amari = b - turu\n if amari == 0:\n print('YES')\n break\n\n if kame !=0:\n if amari % kame == 0:\n print('YES')\n break\n \n i = i + 1\n \nelse:\n print('No')", "a,b = map(int, input().split())\ni = 0\nwhile i<a:\n turu = 2*(a-i)\n kame = 4*i\n \n amari = b % turu\n if amari == 0:\n print('YES')\n break\n\n if kame !=0:\n if amari % kame == 0:\n print('YES')\n break\n \n i = i + 1\n \nelse:\n print('No)\n \n ", "a,b = map(int, input().split())\ni = 0\nwhile i<=a:\n turu = 2*(a-i)\n kame = 4*i\n \n if b == turu:\n print('YES')\n break\n \n if b == kame:\n print('YES')\n break\n \n amari = b - turu\n\n if kame != 0:\n if amari - kame == 0:\n print('YES')\n break\n \n i = i + 1\n \nelse:\n print('No')", "a,b = map(int, input().split())\ni = 0\nwhile i<=a:\n turu = 2*(a-i)\n kame = 4*i\n ans = turu + kame\n if ans == b:\n print('Yes')\n break\n i = i + 1\n \nelse:\n print('No')"] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s024313716', 's149419933', 's515596343', 's594150175', 's842418602', 's005569274'] | [8996.0, 9140.0, 9132.0, 8972.0, 9196.0, 9180.0] | [24.0, 23.0, 23.0, 21.0, 20.0, 22.0] | [333, 336, 354, 272, 311, 176] |
p02640 | u759518460 | 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\ninput = lambda: sys.stdin.readline().rstrip()\n\ndef main():\n x, y = map(int, input().split())\n for i in range(x + 1):\n num = ((2 * i) + (4 * (x - i)))\n if y == num:\n print('yes')\n exit()\n print('No')\n\nif __name__ == '__main__':\n main()\n", "import sys\ninput = lambda: sys.stdin.readline().rstrip()\n\ndef main():\n x, y = map(int, input().split())\n for i in range(x + 1):\n num = ((2 * i) + (4 * (x - i)))\n if y == num:\n print('Yes')\n exit()\n print('No')\n\nif __name__ == '__main__':\n main()\n"] | ['Wrong Answer', 'Accepted'] | ['s122929686', 's363208082'] | [9184.0, 9184.0] | [23.0, 24.0] | [294, 294] |
p02640 | u759988921 | 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())\nres = "NO"\nfor i in range(x + 1):\n for j in range(x + 1 - i):\n if 2 * i + 4 * j == y:\n res = "YES"\n \nprint(res)', 'x, y = map(int, input().split())\n\nres = "No"\nfor i in range(51):\n for j in range(26):\n if (2 * i + 4 * j == y) and (i + j == x):\n res = "Yes"\n \nprint(res)'] | ['Wrong Answer', 'Accepted'] | ['s037118591', 's370360735'] | [9172.0, 9176.0] | [21.0, 22.0] | [176, 186] |
p02640 | u763177133 | 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="ε
₯εγιιγ£γ¦γγΎγγ"\nd="ιΆ΄γ"\ne="εΉγ§γδΊγ"\nf="εΉγ§γγ"\n\nk=b//2-a\nt=2*a-b//2\nif k<0 or t<0 or b%2!=0:\n print(\'Yes\')\nelse:\n print(\'No\')', "n,t = list(map(int,input().split()))\n\nm = 0\nwhile m < n+1:\n\tif m*4 + (n-m)*2 == t:\n print('Yes')\n break\n \n m += 1\n \nif m == (n+1):\n print('No')", 'a,b = map(int,input().split())\nc="ε
₯εγιιγ£γ¦γγΎγγ"\nd="ιΆ΄γ"\ne="εΉγ§γδΊγ"\nf="εΉγ§γγ"\n \nk=b//2-a\nt=2*a-b//2\nif k<0 or t<0 or b%2!=0:\n print(\'No\')\nelse:\n print(\'Yes\')'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s033879645', 's043463841', 's066469868'] | [9024.0, 8964.0, 9028.0] | [24.0, 28.0, 29.0] | [201, 165, 202] |
p02640 | u763628696 | 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())\n\nfor i in range(a+1):\n if 2*(i+a) == b:\n print("Yes")\n else :\n print("No")', 'a,b = map(int,input().split())\nc = 0\nd = ["No","Yes"]\n\nfor i in range(a+1):\n if 2*(i+a) == b:\n c = 1 \n\nprint(d[c])\n '] | ['Wrong Answer', 'Accepted'] | ['s864002649', 's907082998'] | [8984.0, 9116.0] | [31.0, 30.0] | [113, 120] |
p02640 | u765590009 | 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, n = map(int, input().split())\n\nif n == 0:\n print(x)\nelse :\n pn = [int(num) for num in input().split()]\n answers = {}\n for i in range(0,101):\n if not i in pn:\n answers[i] = abs(i-x)\n print(min(answers, key=answers.get))', 'x, y = map(int, input().split())\n \ncheck = True\nfor i in range(x+1) :\n if (i*2+(x-i)*4) == y :\n print("Yes")\n check = False\n break\n \nif check :\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s962139153', 's547015086'] | [9164.0, 9144.0] | [23.0, 28.0] | [234, 168] |
p02640 | u766450407 | 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\nimport math\nimport random;\nfrom collections import defaultdict \nmod =1000000007\nr1 = lambda : int(input());\nrm = lambda : map(int,input().split());\nrms = lambda : map(str,input().split());\nrls = lambda : list(rm())\n\ndef solve():\n a,l = rm();\n if(a*4>=l and a*2>=l and l%2==0):\n print("Yes");\n else:\n print("No")\n \n \n\n\n\n\n\ndef def_value(): \n\treturn "nan"\n\t\nsolve();\n\n', '\n\nimport math\nimport random;\nfrom collections import defaultdict \nmod =1000000007\nr1 = lambda : int(input());\nrm = lambda : map(int,input().split());\nrms = lambda : map(str,input().split());\nrls = lambda : list(rm())\n\ndef solve():\n a,l = rm();\n if(a*4>=l and a*2<=l and l%2==0):\n print("Yes");\n else:\n print("No")\n \n \n\n\n\n\n\ndef def_value(): \n\treturn "nan"\n\t\nsolve();\n\n'] | ['Wrong Answer', 'Accepted'] | ['s684500517', 's561668103'] | [9856.0, 9856.0] | [30.0, 24.0] | [437, 437] |
p02640 | u768219634 | 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 + 1):\n ii = x - i\n if i * 2 + 4 * ii == y:\n ans = 'Yes'\n else:\n ans = 'No'\nprint (ans)", "x,y = map(int,input().split())\nfor i in range(x + 1):\n ii = x - i\n if i * 2 + 4 * ii == y:\n ans = 'Yes'\n else:\n ans = 'No'\nprint (ans)", "x,y = map(int,input().split())\nans = 'No'\nfor i in range(x + 1):\n ii = x - i\n if i * 2 + 4 * ii == y:\n ans = 'Yes'\nprint (ans)"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s212941186', 's751218359', 's272855039'] | [9144.0, 9108.0, 8916.0] | [29.0, 24.0, 26.0] | [157, 157, 139] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.