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
u413632062
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 souwa,ashi=map(int,input().split())\n if souwa*2==ashi or souwa*4==ashi:\n print(\'Yes\')\n else:\n turu=(ashi-souwa*2)\n if turu<0:\n print(\'No\')\n return\n kame=turu/2\n turu=souwa-kame\n if turu<0:\n print(\'No\')\n return\n if kame+turu==souwa:\n print(\'Yes\')\n else:\n print(\'No\')\n print(kame,turu)\nif __name__ == "__main__":\n main()', 'def main():\n x,y=map(int,input().split())\n for i in range(x+1):\n if i*2+(x-i)*4==y:\n print("Yes")\n return\n print(\'No\')\nif __name__ == "__main__":\n main()\n#12 31']
['Wrong Answer', 'Accepted']
['s578347382', 's248657949']
[9224.0, 9096.0]
[20.0, 21.0]
[472, 201]
p02640
u414050834
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\nfor i in range(x+1):\n if 2*i+4*(x-i)==y:\n a=1\n break\nif a=1:\n print('Yes')\nelse:\n print('No')", "x,y=map(int,input().split())\na=0\nfor i in range(x+1):\n if 2*i+4*(x-i)==y:\n a=1\n break\nif a==1:\n print('Yes')\nelse:\n print('No')\n"]
['Runtime Error', 'Accepted']
['s184145606', 's081660080']
[9028.0, 9192.0]
[23.0, 30.0]
[135, 137]
p02640
u414376763
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) % 2 == 0 and y >= 2 * x and y >= 4 * x:\n print('Yes')\nelse:\n print('No')", "x,y = list(map(int,input().split()))\n\nif ((4 * x) - y) % 2 == 0 and y >= 2 * x and y <= 4 * x:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s672365936', 's099167236']
[9148.0, 9116.0]
[33.0, 28.0]
[130, 130]
p02640
u418149936
2,000
1,048,576
There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs. Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.
["input()\nls = list(map(int, input().split(' ')))\n\nif ls.count(0) > 0:\n print(0)\nelse:\n result = 1\n for i in ls:\n result *= i\n if result > 10 ** 18:\n print(-1)\n print(result)", "X, Y = map(int, input().split(' '))\nif Y % 2 == 0 and 2 * X <= Y <= 4 * X:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s640147993', 's499861396']
[9112.0, 9156.0]
[22.0, 31.0]
[209, 113]
p02640
u422581886
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.
["\nif y > x * 4:\n print('No')\n\nelif y < x * 2:\n print('No')\n\nelif y % 2 == 1:\n print('No')\nelse:\n print('Yes')", "x, y = map(int, input().split())\n\n\nif y > x * 4:\n print('No')\n\nelif y < x * 2:\n print('No')\n\nelif y % 2 == 1:\n print('No')\nelse:\n print('Yes')\n"]
['Runtime Error', 'Accepted']
['s356746769', 's666330146']
[9096.0, 9164.0]
[20.0, 21.0]
[234, 269]
p02640
u424241608
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 or 4*x == y : print('Yes')\nelse:print('No')", "x,y = map(int,input().split())\n\nb2 = y-2*x\na = x - b2//2\nif b2%2 or b2 < 0 or a < 0:\n print('No')\nelse:print('Yes')"]
['Wrong Answer', 'Accepted']
['s849899053', 's715079554']
[8948.0, 9088.0]
[27.0, 28.0]
[86, 116]
p02640
u426205961
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 a in range(X + 1):\n b = X - a\n if 2 * a + 4 * b == Y:\n ans = "Yes"\nprint(ans)', 'X, Y = list(map(int, input().split()))\nans = "No"\nfor a in range(X + 1):\n b = X - a\n if 2 * a + 4 * b == Y:\n ans = "Yes"\nprint(ans)']
['Runtime Error', 'Accepted']
['s461591065', 's563851962']
[9096.0, 9188.0]
[29.0, 25.0]
[135, 144]
p02640
u427231601
2,000
1,048,576
There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs. Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.
['x,y = map(int,input().split())\n\nfor i in range(x):\n if 2*(i-1) + 4*(x-(i-1)) == y:\n print("Yes")\n exit()\n \nprint("No")\n ', 'x,y = map(int,input().split())\n\nfor i in range(i + 1):\n if 4*i + 2*(x-i) == y:\n print("Yes")\n exit()\n \nprint("No")\n ', 'x,y = map(int,input().split())\n\nfor i in range(x + 1):\n if 4*i + 2*(x-i) == y:\n print("Yes")\n exit()\n \nprint("No")\n ']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s273043474', 's802667363', 's634002186']
[9168.0, 9164.0, 9168.0]
[21.0, 23.0, 23.0]
[155, 151, 151]
p02640
u428785856
2,000
1,048,576
There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs. Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.
['X,Y=input().split();\nX=int(X);\nY=int(Y);\nfor k in range(X+1):\n print(k);\n if Y==4*k+2*(X-k):\n print("Yes");\n exit();\nprint("No");', 'X,Y=input().split();\nX=int(X);\nY=int(Y);\nfor k in range(X+1):\n if Y==4*k+2*(X-k):\n print("Yes");\n exit();\nprint("No");']
['Wrong Answer', 'Accepted']
['s404655970', 's215578272']
[9176.0, 9172.0]
[24.0, 24.0]
[137, 125]
p02640
u429029348
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(1,x+1):\n if 2*i+4*(x-i)==y:\n ans="Yes"\n else:\n ans="No"\nprint(ans)', 'x,y=map(int,input().split())\nfor i in range(x+1):\n if 2*i+4*(x-i)==y:\n ans="Yes"\n break\n else:\n ans="No"\nprint(ans)']
['Wrong Answer', 'Accepted']
['s691472603', 's959909758']
[9136.0, 9104.0]
[22.0, 19.0]
[118, 126]
p02640
u430726059
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==0 and Y-2*X>=0 and 4*X-Y>=0:\n print("Yes")\nelse:\n print("No")', 'X,Y=map(int,input().split())\n \nif Y%2==0 and Y-2*X>=0 and 4*X-Y>=0:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s653608615', 's774176886']
[9052.0, 9156.0]
[27.0, 29.0]
[102, 102]
p02640
u431573188
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\ndef func(x,y):\n if y % 2 == 1:\n return False\n if 4*x < y:\n return False\n else:\n return True\n \nif func(x,y):\n print("Yes")\nelse:', 'x, y = map(int, input().split())\n\ndef func(x,y):\n if y % 2 == 1:\n return False\n if 4*x < y:\n return False\n if y < 2*x:\n return False\n else:\n return True\n \nif func(x,y):\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s398142025', 's209669526']
[9032.0, 9208.0]
[22.0, 23.0]
[197, 250]
p02640
u432098488
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) & (Y%2==0):\n print('YES')\nelse:\n print('NO')", "X, Y = map(int, input().split())\nif (2*X <= Y <= 4*X) & (Y%2==0):\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s671233114', 's199910255']
[9164.0, 9164.0]
[21.0, 23.0]
[104, 104]
p02640
u432691050
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\na, b = [int(x) for x in stdin.readline().rstrip().split()]\nprint(a, b)\nif (a*2<=b and a*4>=b) and b%2==0:\n print("Yes")\nelse:\n print("No")\n \n\n', 'from sys import stdin\n\na, b = [int(x) for x in stdin.readline().rstrip().split()]\nif (a*2<=b and a*4>=b) and b%2==0:\n print("Yes")\nelse:\n print("No")\n \n\n']
['Wrong Answer', 'Accepted']
['s163034387', 's730671843']
[9160.0, 9160.0]
[24.0, 22.0]
[170, 158]
p02640
u433184056
2,000
1,048,576
There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs. Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.
['x, y = map(int, input().split())\n\nflag = 0\nfor i in range(x):\n if (i * 2 + (x - i) * 4) == y:\n print("YES")\n flag = 1\n break\nif flag == 0:\n print("NO")', 'x, y = map(int, input().split())\n\nflag = 0\nfor i in range(x):\n if (i * 2 + (x - i) * 4) == y:\n print("YES")\n flag = 1\n break\nif flag == 0:\n\tprint("NO")', 'x, y = map(int, input().split())\n\nflag = 0\nfor i in range(x):\n print(i)\n if (i * 2 + (x - i) * 4) == y:\n print("YES")\n flag = 1\n break\nif flag == 0:\n print("NO")', 'x, y = map(int, input().split())\n\nflag = 0\nfor i in range(x+1):\n if (i * 2 + (x - i) * 4) == y:\n print("Yes")\n flag = 1\n break\nif flag == 0:\n print("No")\n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s461640221', 's602988893', 's619080583', 's842796840']
[9176.0, 9172.0, 9172.0, 9136.0]
[21.0, 24.0, 22.0, 23.0]
[162, 161, 173, 165]
p02640
u433375322
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 = 1\nfor i in range(0,a):\n for k in range(0.a-i):\n if 2*i+4*k ==b:\n c = 0\n break\nif c ==0:\n print("Yes")\nelse:\n print("No")', 'a,b =map(int,input().split())\nc = 1\nfor i in range(a):\n if (b-2*a)%4==0:\n c = 0\n break\nif c ==1:\n print("No")\nelse:\n print("Yes")\n', 'x,y=map(int,input().split())\nflag=0\nfor i in range(x+1):\n if i*2+(x-i)*4==y:\n print("Yes")\n flag=1\n break\nif flag==0:\n print("No")\n']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s097025963', 's256269814', 's013279960']
[9020.0, 9164.0, 9176.0]
[22.0, 21.0, 24.0]
[170, 139, 158]
p02640
u439757045
2,000
1,048,576
There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs. Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.
['X,Y=map(int,input().split())\ndef s(X,Y):\n for i in range(0,X+1):\n for j in range(i+1,X+2):\n if (2*i+4*j)==Y or (2*j+4*i)==Y:\n return " Yes "\n return " No "\nprint(s(X,Y))\n', 'X,Y=map(int,input().split())\ndef s(X,Y):\n for i in range(0,X+1):\n t=X-i\n if (2*i+4*t==Y):\n return "Yes"\n return "No"\nans=(s(X,Y))\nprint(ans)']
['Wrong Answer', 'Accepted']
['s437123594', 's517013619']
[9180.0, 9180.0]
[22.0, 24.0]
[209, 175]
p02640
u440613652
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(n+1):\n if i*4+(n-i)*2==y:\n print("Yes")\n \nelse:\n print("No")', 'x,y=map(int,input().split())\n \nfor i in range(x+1):\n if i*4+(x-i)*2==y:\n print("Yes")\n break \nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s408571893', 's678774108']
[9172.0, 9160.0]
[24.0, 23.0]
[113, 122]
p02640
u440975163
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()))\nif (4 * a[0] - a[1]) % 2 == 0 and 2 * t >= (4 * a[0] - a[1]) >= 0:\n print('Yes')\nelse:\n print('No')", "a = list(map(int, input().split()))\nif (4 * a[0] - a[1]) % 2 == 0 and 2 * a[0] >= (4 * a[0] - a[1]) >= 0:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s584275187', 's776879546']
[9200.0, 9168.0]
[20.0, 21.0]
[141, 144]
p02640
u442836562
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\na = y / 2\nb = 0\nwhile (a + b) != x:\n a -= 2\n b += 1\n if a == -1:\n a = 0\n elif a < -1:\n break\n\ns = 2 * a + 4 * b\nif s == y and a >= 0:\n print("yes")\nelse:\n print("no")', 'import sys\nx, y = map(int, input().split())\n\nif y % 2 == 1:\n print ("no")\n sys.exit()\n \na = y / 2\nb = 0\nwhile (a + b) != x:\n a -= 2\n b += 1\n if a < 0: break\n\ns = 2 * a + 4 * b\nif s == y and a >= 0:\n print("yes")\nelse:\n print("no")', 'x, y = map(int, input().split())\n\na = y / 2\nb = 0\nwhile (a + b) != x:\n a -= 2\n b += 1\n if a < 0: break\n\ns = 2 * a + 4 * b\nif s == y and a >= 0:\n print("yes")\nelse:\n print("no")', 'x, y = map(int, input().split())\n \nans = "No"\n \nfor a in range(x + 1):\n b = x - a\n if (2 * a + 4 * b ) == y:\n ans = "Yes"\n break\n \nprint (ans)']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s252075986', 's263202341', 's462575437', 's617398665']
[9192.0, 9132.0, 9104.0, 9064.0]
[26.0, 28.0, 32.0, 25.0]
[212, 238, 181, 153]
p02640
u445580781
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())\na = (m-2*n) / 2\nif isinstance(a,int):\n print('Yes')\nelse: print('No')", "n , m = map(int , input().split())\nprint('Yes') if (m - 2 * n) % 2 ==0 and (m - 2 * n) >=0 and 4 * n - m >= 0 and (4 * n - m) % 2 == 0 else print('No')"]
['Wrong Answer', 'Accepted']
['s438334827', 's534567139']
[9056.0, 9092.0]
[28.0, 26.0]
[109, 151]
p02640
u449514925
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.
['# -*- coding: utf-8 -*-\n\nX, Y = map(int, input().split())\n\n#s = input()\n\n\n\nans = "YES"\n\nif not Y%2 == 0:\n ans = "NO"\nelif Y < 2*X:\n ans = "NO"\nelif 4*X < Y:\n ans = "NO"\n\nprint(ans)\n', '# -*- coding: utf-8 -*-\n\nX, Y = map(int, input().split())\n\n#s = input()\n\n\n\nans = "Yes"\n\nif not Y%2 == 0:\n ans = "No"\nelif Y < 2*X:\n ans = "No"\nelif 4*X < Y:\n ans = "No"\n\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s878531693', 's115982921']
[9160.0, 9188.0]
[21.0, 21.0]
[360, 360]
p02640
u454866890
2,000
1,048,576
There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs. Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.
['n,l = list(map(int, input().split()))\nif 2*n <= l <= 4*n and (4*n - l) % 2 == 0:\n print("yes")\nelse:\n print("No")', 'n,l = list(map(int, input().split()))\nif l <= 4*n and (4*n - l) % 2 == 0:\n print("yes")\nelse:\n print("No")', 'n,l = list(map(int, input().split()))\nif 2*n <= l <= 4*n and (4*n - l) % 2 == 0:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s440393214', 's779954030', 's863478490']
[8984.0, 9016.0, 9088.0]
[29.0, 27.0, 25.0]
[115, 108, 115]
p02640
u456342056
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\njudge = (y - 4 * x) / 2\nif judge.is_integer() and judge >= 0 and judge <= x:\n print("Yes")\nelse:\n print("No")', 'x, y = map(int, input().split())\n\njudge = (4 * x - y) / 2\nif judge.is_integer() and judge >= 0 and judge <= x:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s853097830', 's941581403']
[9160.0, 9164.0]
[21.0, 21.0]
[149, 149]
p02640
u457802431
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\na = (4*X-Y)/2\nb = X - a\nd = a.is_integer()\ne = b.is_integer()\nif a==0 and b==0:\n print('No')\nelif a>0 and b>=0:\n if d and e:\n print('yes')\n else:\n print('No')\nelif a>=0 and b>0:\n if d and e:\n print('yes')\n else:\n print('No')\nelse:\n print('No')", "X, Y = map(int, input().split())\n\na = (4*X-Y)/2\nb = X - a\n\nd = a.is_integer()\ne = b.is_integer()\nif a>=0 and b>=0:\n if d and e:\n print('yes')\n else:\n print('No')\nelse:\n print('No')", "X, Y = map(int, input().split())\n\na = (4*X-Y)/2\nb = X - a\n\nd = a.is_integer()\ne = b.is_integer()\nprint(d)\nprint(e)\nif a==0 and b==0:\n print('No')\nelif a>=0 and b>=0:\n if d and e:\n print('yes')\n else:\n print('No')\nelse:\n print('No')", "X, Y = map(int, input().split())\n\na = (4*X-Y)/2\nb = X - a\nd = a.is_integer()\ne = b.is_integer()\nif a==0 and b==0:\n print('No')\nelif a>0 and b>=0:\n if d and e:\n print('Yes')\n else:\n print('No')\nelif a>=0 and b>0:\n if d and e:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')\n"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s277204896', 's502983250', 's657417517', 's240157034']
[9200.0, 9180.0, 9132.0, 9196.0]
[21.0, 22.0, 23.0, 21.0]
[323, 203, 257, 324]
p02640
u459391214
2,000
1,048,576
There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs. Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.
["X,Y= map(int,input().split())\nif (Y%2==0 and Y>=2*X and Y<=4*X):\n print('yes')\nelse:\n print('No')\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')", "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')", "X,Y= map(int,input().split())\nb=(Y-2*X)%2\na=(4*X-Y)%2\nB=(Y-2*X)/2\nA=(4*X-Y)/2\nif (b==0 and a==0 and A>=0 and B>=0):\n print('yes')\nelse:\n print('No')", "X,Y= map(int,input().split())\nb=(Y-2*X)%2\na=(4*X-Y)%2\nB=(Y-2*X)/2\nA=(4*X-Y)/2\nif b==0 and a==0 and A>=0 and B>=0:\n print('yes')\nelse:\n print('No')", "X,Y= map(int,input().split())\nb=(Y-2*X)%2\na=(4*X-Y)%2\nB=(Y-2*X)/2\nA=(4*X-Y)/2\nif b==0 and a==0 and A>=0 and B>=0:\n print('yes')\nelse:\n print('No')", "X,Y= map(int,input().split())\nb=(Y-2*X)%2\na=(4*X-Y)%2\nB=(Y-2*X)/2\nA=(4*X-Y)/2\nif b==0 and a==0 and A>=0 and B>=0:\n print('yes')\nelse:\n print('No')\n", "X,Y= map(int,input().split())\nb=(Y-2*X)%2\na=(4*X-Y)%2\nB=(Y-2*X)/2\nA=(4*X-Y)/2\nif (b==0 and a==0 and A>=0 and B>=0):\n print('Yes')\nelse:\n print('No')\n"]
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s030394081', 's258861160', 's437164117', 's553401212', 's606201803', 's737457343', 's931065789', 's207724695']
[9084.0, 9136.0, 9072.0, 9116.0, 9064.0, 9116.0, 9108.0, 9096.0]
[27.0, 29.0, 24.0, 25.0, 26.0, 29.0, 27.0, 29.0]
[104, 103, 101, 154, 152, 152, 153, 155]
p02640
u463470469
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\nfor i in range(X+1):\n if 2*i+4*(X-i)==Y:\n print('Yes')\n \n else:\n a += 1\n \nif a==X\n \n \nif a ==1:\n print('No')", "X, Y =map(int,input().split())\na = 0\nfor i in range(X+1):\n if 2*i+4*(X-i)==Y:\n print('Yes')\n \n else:\n a = 1\n \nif a ==1:\n print('No')", "X, Y =map(int,input().split())\na = 0\nfor i in range(X+1):\n if 2*i+4*(X-i)==Y:\n print('Yes')\n else:\n a +=1\n \n \nif a ==X+1:\n print('No')"]
['Runtime Error', 'Wrong Answer', 'Accepted']
['s582418196', 's644654732', 's460944911']
[8820.0, 9056.0, 9112.0]
[26.0, 27.0, 33.0]
[167, 148, 147]
p02640
u464912857
2,000
1,048,576
There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs. Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.
['input_line = input().split()\n\nfor i in range(input_line[1]):\n print(input_line[0])', "X, Y = map(int, input().split())\n\nans = 'No'\nfor a in range(X + 1):\n\tb = X - a\n\tif 2 * a + 4 * b == Y:\n\t\tans = 'Yes'\n \nprint(ans)"]
['Runtime Error', 'Accepted']
['s051688381', 's194035399']
[9092.0, 9104.0]
[31.0, 29.0]
[83, 136]
p02640
u466282478
2,000
1,048,576
There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs. Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.
['input_line = input().split(" ")\nX = int(input_line[0])\nY = int(input_line[1])\nPat = 0\nfor i in range(X + 1):\n \tC = i\n\tT = X - i\n Cf = C * 2\n Tf = T * 4\n F = Cf + Tf\n\tif Y == F:\n Pat = Pat + 1\nif Pat >= 0:\n print("Yes")\nelse:\n print("No")\n \n \n \n \n', 'input_line = input().split(" ")\nX = int(input_line[0])\nY = int(input_line[1])\nPat = 0\nfor i in range(X + 1):\n C = i\n T = X - i\n Cf = C * 2\n Tf = T * 4\n F = Cf + Tf\n if Y == F:\n Pat = Pat + 1\nif Pat > 0:\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Accepted']
['s243993098', 's819142872']
[8920.0, 9200.0]
[23.0, 25.0]
[268, 249]
p02640
u468972478
2,000
1,048,576
There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs. Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.
['x, y = map(int, input().split())\nfor i in range(0, x+1):\n a.append(2 * i + 4 * (3 - i))\nprint("Yes" if y in a else "No")', 'x, n = map(int, input().split())\ns = []\nif n == 0:\n print(x)\nelse:\n a = sorted([i for i in list(map(int, input().split())) if i != x])\n for i in range(n):\n s.append(abs(a[i] - x))\n b = a[s.index(min(s))]\n print(b)', 'x, y = map(int, input().split())\na = []\nfor i in range(0, x+1):\n a.append(2 * i + 4 * (x - i))\nprint("Yes" if y in a else "No")']
['Runtime Error', 'Runtime Error', 'Accepted']
['s124774953', 's426949754', 's060630381']
[9076.0, 9088.0, 9068.0]
[23.0, 23.0, 26.0]
[121, 221, 128]
p02640
u469936642
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(y+1):\n if i * 2 + (y-i) * 4 == y:\n print("Yes")\n exit()\nprint("No")\n', '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']
['s560341752', 's658454980']
[9164.0, 9164.0]
[23.0, 23.0]
[123, 122]
p02640
u471503862
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 (4*x-y)%2 == 0 and 4*x-y >= 0 and 2*x >= y:\n print('Yes')\nelse:\n print('No')", "x, y = map(int, input().split())\n\nif (4*x-y)%2 == 0 and 4*x-y >= 0 and 2*x <= y:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s453615203', 's755888077']
[9164.0, 9164.0]
[22.0, 24.0]
[115, 115]
p02640
u472039178
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.
['XY = input().split()\ntk = ""\nfor i in range(int(XY[0])):\n for j in range(int(XY[0])):\n if (4*i + 2*j) == int(XY[1]):\n print("Yes")\n break\n else:\n print("No")\n break\n', 'XY = input().split()\nX = int(XY[0])\nY = int(XY[1])\nl = []\nfor i in range(X+1):\n for j in range (X+1):\n if i + j == X:\n if (4*i + 2*j) == Y:\n l.append("Yes")\n else:\n l.append("No")\nif l.count("Yes") > 0:\n print("Yes")\nelse:\n print("No")\n #print(str(i) + "," + str(j))']
['Wrong Answer', 'Accepted']
['s839894693', 's557001002']
[9156.0, 9096.0]
[27.0, 28.0]
[214, 341]
p02640
u473234731
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.
['#-*- using:utf-8 -*-\n \nX, Y = map(int, input().split())\na = (4*X-Y)/2\nb = (2*X-Y)/2\nif a.is_integer() and b.is_integer():\n if a > 0 or b > 0:\n print("YES")\n else:\n print("No")\n', '#-*- using:utf-8 -*-\n \nX, Y = map(int, input().split())\na = (4*X-Y)/2\nb = (2*X-Y)/2\nif(X*2 <= Y and Y <= X*4):\n if a.is_integer() and b.is_integer():\n if a > 0 or b > 0:\n print("YES")\n else:\n print("No")\n else:\n print("No")\nelse:\n print("No")\n', '#-*- using:utf-8 -*-\n \nX, Y = map(int, input().split())\n\nfor i in range(0, X+1):\n f = 2 * i + 4 * (X - i)\n if f == Y:\n print("Yes")\n break\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s744245590', 's882907006', 's267372485']
[9104.0, 9184.0, 9176.0]
[24.0, 23.0, 23.0]
[196, 295, 180]
p02640
u474561976
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 io,sys\nsys.setrecursionlimit(10**6)\n\n\ndef main():\n X,Y = map(int,sys.stdin.readline().rstrip().split())\n\n y = (Y-2*X)/2\n x = X-y\n\n if y>=0 and y == int(y) and x >= 0:\n print("YES")\n else:\n print("NO")\nmain()', 'import io,sys\nsys.setrecursionlimit(10**6)\n\n\ndef main():\n X,Y = map(int,sys.stdin.readline().rstrip().split())\n\n y = (Y-2*X)/2\n x = X-y\n\n if y>=0 and y == int(y) and x >= 0:\n print("Yes")\n else:\n print("No")\nmain()']
['Wrong Answer', 'Accepted']
['s915134054', 's467041815']
[9172.0, 9172.0]
[20.0, 18.0]
[243, 243]
p02640
u476674874
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.
['\ndef main():\n X, Y = map(int, input().split())\n #total X\n #feet Y\n for x in range(X+1):\n y = X - x\n feet = 4 * x + 2 * y\n if feet == Y:\n print("YES")\n return\n\n print("NO")\n\nif __name__ == \'__main__\':\n main()\n', '\ndef main():\n X, Y = map(int, input().split())\n #total X\n #feet Y\n for x in range(X+1):\n y = X - x\n feet = 4 * x + 2 * y\n if feet == Y:\n print("Yes")\n return\n\n print("No")\n\nif __name__ == \'__main__\':\n main()\n']
['Wrong Answer', 'Accepted']
['s094244911', 's806380117']
[9168.0, 9164.0]
[22.0, 21.0]
[269, 269]
p02640
u477026604
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 & 1):\n print("NO")\nelif(y/2 < x or y > 4*x):\n print("NO")\nelse:\n print("YES")', 'x, y = map(int, input().split())\nif(y & 1):\n print("No")\nelif(y < (x<<1) or y > (x<<2)):\n print("No")\nelse:\n print("Yes")']
['Wrong Answer', 'Accepted']
['s143176142', 's623351630']
[9132.0, 9168.0]
[25.0, 27.0]
[119, 125]
p02640
u477638578
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.
["'''\nIn the name of God\n'''\n\na,b = map(int, input().split())\n\nif b >= 2*a and b <= 4*a:\n print('YES')\nelse:\n print('NO')\n", "'''\nIn the name of God\n'''\n\na, b = map(int, input().split())\n\nif b >= 2*a and b <= 4*a and b % 2 == 0:\n print('Yes')\nelse:\n print('No')\n"]
['Wrong Answer', 'Accepted']
['s586524049', 's184934356']
[9156.0, 9124.0]
[32.0, 27.0]
[126, 142]
p02640
u478994819
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 numpy.linalg import solve\n\nX,Y = input().split(" ")\n\nleft = [[2, 4],\n [1, 1]]\n \nright = [int(Y), int(X)]\n \nAns = solve(left, right)\n\nprint(Ans)\n\n\nif Ans[0].is_integer() == True and Ans[1].is_integer() == True and Ans[0] >= 0 and Ans[1] >= 0:\n print("Yes")\nelse:\n print("No")\n', 'from numpy.linalg import solve\n\nX,Y = input().split(" ")\n\nleft = [[2, 4],\n [1, 1]]\n \nright = [int(Y), int(X)]\n \nAns = solve(left, right)\n\n#print(Ans)\n\n\nif Ans[0].is_integer() == True and Ans[1].is_integer() == True and Ans[0] >= 0 and Ans[1] >= 0:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s545834273', 's754791204']
[27440.0, 27396.0]
[113.0, 131.0]
[362, 362]
p02640
u481919972
2,000
1,048,576
There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs. Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.
['l = input().split()\nx = l[0]\ny = int(l[1])\n\nans = 0\n\nfoots = 2*int(x)\n\nfor i in range(int(x)+1):\n if foots == y:\n ans +=1\n foots += 2\n\nprint(foots)\n\nif ans == 1:\n print("Yes")\n\nelse:\n print("No")', 'l = input().split()\nx = l[0]\ny = int(l[1])\n\nans = 0\n\nfoots = 2*int(x)\n\nfor i in range(int(x)+1):\n if foots == y:\n ans +=1\n foots += 2\n\nif ans == 1:\n print("Yes")\n\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s765937500', 's876844705']
[9096.0, 9180.0]
[28.0, 30.0]
[215, 201]
p02640
u483726390
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())\nkame = (y - 2*x) / 2\ntsuru = x - kame\nif kame.is_integer() and tsuru.is_integer():\n if kame > 0 and tsuru >= 0:\n print('Yes')\n elif tsuru > 0 and kame >= 0:\n print('Yes')\n\nprint('No')\n\n\n", "x, y = map(int,input().split())\nkame = (y - 2*x) / 2\nif kame.is_integer() and kame >= 0:\n tsuru = x - kame\n if tsuru.is_integer() and tsuru >= 0:\n print('Yes')\nprint('No')", "x, y = map(int,input().split())\nkame = (y - 2*x) / 2\ntsuru = x - kame\nif kame.is_integer() and tsuru.is_integer():\n if kame > 0 and tsuru >= 0:\n print('Yes')\n elif tsuru > 0 and kame >= 0:\n print('Yes')\n else:\n print('No')\n exit()\nelse:\n print('No')"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s072233146', 's204580951', 's056203728']
[9168.0, 9196.0, 9184.0]
[19.0, 22.0, 22.0]
[226, 176, 263]
p02640
u485172913
2,000
1,048,576
There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs. Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.
[" x, y = map(int, input().split())\nif y%2 == 0 and (x*2 <= y <= x*4):\n print('Yes')\nelse:\n print('No')", "x, y = map(int, input().split())\nif y%2 == 0 and (x*2 <= y) and (y<= x*4):\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s317537527', 's561937591']
[9000.0, 9124.0]
[21.0, 20.0]
[103, 109]
p02640
u490195279
2,000
1,048,576
There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs. Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.
['import numpy as np\n\n\ndef main(X, Y):\n if 2*X <= Y and 4*X >= Y:\n return "YES"\n return "NO"\n\n\nX, Y = map(int, input().split())\nprint(main(X, Y))\n', 'import numpy as np\n\n\ndef main(X, Y):\n if 2*X <= Y and 4*X >= Y:\n return "YES"\n return "NO"\n\n\nX, Y = map(int, input().split())\nprint(main(X, Y))\n', 'import numpy as np\n\n\ndef main(X, Y):\n if 2*X <= Y and 4*X >= Y and Y % 2 == 0:\n return "Yes"\n return "No"\n\n\nX, Y = map(int, input().split())\nprint(main(X, Y))\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s183611556', 's555965961', 's366243133']
[27136.0, 27132.0, 27132.0]
[101.0, 110.0, 121.0]
[157, 157, 172]
p02640
u491462774
2,000
1,048,576
There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs. Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.
['x,y = map(int, input().split())\n\nprint("Yes" if (x % 2 == 0) and y >= 2*x and y <= 4*x else "No")', "x,y = map(int, input().split())\n\nprint('yes' if y >= 2*x and y <= 4*x else 'no')", 'x,y = map(int, input().split())\n\nprint("yes" if y >= 2*x and y <= 4*x else "no")', 'x,y = map(int, input().split())\n\nprint("Yes" if (y % 2 == 0) and y >= 2*x and y <= 4*x else "No")\n\n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s352345406', 's365848800', 's831409396', 's748513403']
[8992.0, 9080.0, 9096.0, 9172.0]
[29.0, 31.0, 29.0, 24.0]
[98, 80, 80, 100]
p02640
u491729244
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 = map(int, input().split())\nprint(X, Y)\n\n# a + b = X\n# 2a + 4b = Y\n# --\n# b = (Y-2X) / 2\n\nb = (Y - 2 * X) / 2.0\n\nif b.is_integer():\n print("Yes")\nelse:\n print("No")\n', '#!/usr/bin/env python3\n\nX, Y = map(int, input().split())\n\n# a + b = X\n# 2a + 4b = Y\n\nfor a in range(X + 1):\n b = X - a\n\n if (2 * a + 4 * b) == Y:\n print("Yes")\n exit()\n\nprint("No")\n']
['Wrong Answer', 'Accepted']
['s012666441', 's442043558']
[9180.0, 9160.0]
[19.0, 22.0]
[200, 201]
p02640
u496821919
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 itertools import accumulate\nfrom collections import Counter\nn = int(input())\nT = []\nfor _ in range(n):\n T.append(int(input()))\nT.sort()\nprint(sum(accumulate(T)))\ndic = Counter(T)\nans = 1\nmod = 10**9+7\nfor i in dic.values():\n for j in range(1,i+1):\n ans *= j\n ans %= mod\nprint(ans)', 'x,y = map(int,input().split())\nif y % 2 != 0:\n print("No")\n exit()\na = y//2-x\nb = 2*x-y//2\nif a >= 0 and b >= 0:\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Accepted']
['s805086512', 's917998678']
[9344.0, 9168.0]
[26.0, 20.0]
[305, 158]
p02640
u498465804
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.
['# coding: utf-8\n# Your code here!\n\nx, y = list(map(int, input().split()))\n\nif(y > x*4):\n print("no")\nelse:\n if(y%2 == 1):\n print("no")\n else:\n print("yes")', '# coding: utf-8\n# Your code here!\n\nx, y = list(map(int, input().split()))\n\nif(y > x*4):\n print("No")\nelif(y/2 < x):\n print("No")\nelse:\n if(y%2 == 1):\n print("No")\n else:\n print("Yes")']
['Wrong Answer', 'Accepted']
['s196117854', 's188893436']
[9188.0, 9176.0]
[20.0, 22.0]
[178, 209]
p02640
u500673386
2,000
1,048,576
There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs. Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.
["x,y=map(int,input().split())\nfor i in range(x):\n if 2*(i+1)+4*(x-i-1)==y:\n print('Yes')\n else:\n if i==x-1:\n print('No')\n pass ", "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 if i==x:\n print('No')\n break"]
['Wrong Answer', 'Accepted']
['s078412449', 's678335001']
[9088.0, 9032.0]
[26.0, 26.0]
[167, 178]
p02640
u502594696
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=(4*X-Y)//2\nif a.is_integer() and a>=0 and a<=100:\n print("Yes")\nelse:\n print("No")', 'X,Y=map(int,input().split())\na=(4*X-Y)/2\nif X<=Y and a.is_integer() and a>=0 and a<=50:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s091666091', 's021026301']
[8972.0, 9164.0]
[28.0, 28.0]
[115, 122]
p02640
u504662715
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 a = "NO"\nelse:\n t = 2*X-Y/2\n k = Y/2-X\n if int(t)<0 or int(k)<0:\n a = "NO"\n else:\n a = "YES"\nprint(a)', 'X,Y = map(int,input().split())\nif Y % 2 !=0:\n a = "No"\nelse:\n t = 2*X-Y/2\n k = Y/2-X\n if int(t)<0 or X<int(t) or int(Y/2)<int(t):\n a = "No"\n elif int(k)<0 or X<int(k) or int(Y/4)<int(k):\n a = "No"\n else:\n a = "Yes"\nprint(a)']
['Wrong Answer', 'Accepted']
['s180024019', 's148340872']
[9204.0, 9136.0]
[22.0, 23.0]
[176, 262]
p02640
u507145838
2,000
1,048,576
There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs. Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.
['X, Y = map(int, input().split())\n\n\na = 2*X - Y/2\n\n\nif a >= 0 and isinstance(a, int):\n print("Yes")\nelse:\n print("No")', 'X, Y = map(int, input().split())\n\na = 2*X - Y/2\nb = Y/2 - X\n\nif a >= 0 and b >= 0 and isinstance(a, int) and isinstance(b, int):\n print("Yes")\nelse:\n print("No")', 'X, Y = map(int, input().split())\nif Y % 2 == 1:\n print("No")\n exit()\n\na = (2 * X) - int(Y / 2)\nb = X - a\n\n\n\nif a >= 0 and isinstance(a, int) and b >= 0 and isinstance(b, int):\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s168828208', 's695794641', 's491848991']
[9108.0, 9172.0, 9184.0]
[23.0, 22.0, 22.0]
[119, 163, 212]
p02640
u509029769
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 t in range(X+1):\n k = X - t\n if t*2 + k*4 == Y:\n p = 1\n break\n else:\n p = 0\n\nif p == 1:\n print("yes")\nelif p == 0:\n print("no")', 'X,Y = map(int,input().split())\n\nfor t in range(X+1):\n k = X - t\n if t*2 + k*4 == Y:\n p = 1\n break\n else:\n p = 0\n\nif p == 1:\n print("yes")\nelif p == 0:\n print("no")', "X,Y = map(int,input().split())\nkame = (Y-2*X)\n\nif kame%2 == 0:\n kame = kame//2\n turu = X-kame\n if X == kame+turu and kame>=0 and turu>=0:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s085802029', 's173227878', 's428523497']
[9164.0, 9164.0, 8972.0]
[26.0, 30.0, 26.0]
[199, 199, 219]
p02640
u509739538
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\nfrom collections import deque\nfrom collections import defaultdict\nimport itertools as it\n\n\ndef readInt():\n\treturn int(input())\ndef readInts():\n\treturn list(map(int, input().split()))\ndef readChar():\n\treturn input()\ndef readChars():\n\treturn input().split()\ndef factorization(n):\n\tres = []\n\tif n%2==0:\n\t\tres.append(2)\n\tfor i in range(3,math.floor(n//2)+1,2):\n\t\tif n%i==0:\n\t\t\tc = 0\n\t\t\tfor j in res:\n\t\t\t\tif i%j==0:\n\t\t\t\t\tc=1\n\t\t\tif c==0:\n\t\t\t\tres.append(i)\n\tif len(res)==0:\n\t\tres = [n]\n\treturn res\ndef fact2(n):\n\tp = factorization(n)\n\tres = []\n\tfor i in p:\n\t\tc=0\n\t\tz=n\n\t\twhile 1:\n\t\t\tif z%i==0:\n\t\t\t\tc+=1\n\t\t\t\tz/=i\n\t\t\telse:\n\t\t\t\tbreak\n\t\tres.append([i,c])\n\treturn res\ndef fact(n):\n\tans = 1\n\tm=n\n\tfor _i in range(n-1):\n\t\tans*=m\n\t\tm-=1\n\treturn ans\ndef comb(n,r):\n\tif n<r:\n\t\treturn 0\n\tl = min(r,n-r)\n\tm=n\n\tu=1\n\tfor _i in range(l):\n\t\tu*=m\n\t\tm-=1\n\treturn u//fact(l)\ndef combmod(n,r,mod):\n\treturn (fact(n)/fact(n-r)*pow(fact(r),mod-2,mod))%mod\ndef printQueue(q):\n\tr=copyQueue(q)\n\tans=[0]*r.qsize()\n\tfor i in range(r.qsize()-1,-1,-1):\n\t\tans[i] = r.get()\n\tprint(ans)\nclass UnionFind():\n\tdef __init__(self, n):\n\t\tself.n = n\n\t\tself.parents = [-1]*n\n\n\tdef find(self, x): # root\n\t\tif self.parents[x]<0:\n\t\t\treturn x\n\t\telse:\n\t\t\tself.parents[x] = self.find(self.parents[x])\n\t\t\treturn self.parents[x]\n\n\tdef union(self,x,y):\n\t\tx = self.find(x)\n\t\ty = self.find(y)\n\n\t\tif x==y:\n\t\t\treturn\n\n\t\tif self.parents[x]>self.parents[y]:\n\t\t\tx,y = y,x\n\n\t\tself.parents[x]+=self.parents[y]\n\t\tself.parents[y]=x\n\n\tdef size(self,x):\n\t\treturn -1*self.parents[self.find(x)]\n\n\tdef same(self,x,y):\n\t\treturn self.find(x)==self.find(y)\n\n\tdef members(self,x): # much time\n\t\troot = self.find(x)\n\t\treturn [i for i in range(self.n) if self.find(i)==root]\n\n\tdef roots(self):\n\t\treturn [i for i,x in enumerate(self.parents) if x<0]\n\n\tdef group_count(self):\n\t\treturn len(self.roots())\n\n\tdef all_group_members(self):\n\t\treturn {r: self.members(r) for r in self.roots()} # 1~n\ndef bitArr(n):\n\tx = 1\n\tzero = "0"*n\n\tans = []\n\tans.append([0]*n)\n\tfor i in range(2**n-1):\n\t\tans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))\n\t\tx+=1\n\treturn ans;\ndef arrsSum(a1,a2):\n\tfor i in range(len(a1)):\n\t\ta1[i]+=a2[i]\n\treturn a1\ndef maxValue(a,b,v):\n\tv2 = v\n\tfor i in range(v2,-1,-1):\n\t\tfor j in range(v2//a+1): \n\t\t\tk = i-a*j\n\t\t\tif k%b==0:\n\t\t\t\treturn i\n\treturn -1\ndef copyQueue(q):\n\tnq = queue.Queue()\n\tn = q.qsize()\n\tfor i in range(n):\n\t\tx = q.get()\n\t\tq.put(x)\n\t\tnq.put(x)\n\treturn nq\ndef get_sieve_of_eratosthenes(n):\n\tdata = [2]\n\t#data = [0,0,0]\n\tfor i in range(3,n+1,2):\n\t\tdata.append(i)\n\t\tdata.append(0)\n\tfor i in range(len(data)):\n\t\tinterval = data[i]\n\t\tif interval!=0:\n\t\t\tfor j in range(i+interval,n-1,interval):\n\t\t\t\tdata[j] = 0\n\tans = [x for x in data if x!=0]\n\t\n\treturn ans\n\nx,y = readInts()\n\nif y/2>=x and y/2<=x:\n\tprint("Yes")\nelse:\n\tprint("No")', 'import math\nfrom collections import deque\nfrom collections import defaultdict\nimport itertools as it\n\n\ndef readInt():\n\treturn int(input())\ndef readInts():\n\treturn list(map(int, input().split()))\ndef readChar():\n\treturn input()\ndef readChars():\n\treturn input().split()\ndef factorization(n):\n\tres = []\n\tif n%2==0:\n\t\tres.append(2)\n\tfor i in range(3,math.floor(n//2)+1,2):\n\t\tif n%i==0:\n\t\t\tc = 0\n\t\t\tfor j in res:\n\t\t\t\tif i%j==0:\n\t\t\t\t\tc=1\n\t\t\tif c==0:\n\t\t\t\tres.append(i)\n\tif len(res)==0:\n\t\tres = [n]\n\treturn res\ndef fact2(n):\n\tp = factorization(n)\n\tres = []\n\tfor i in p:\n\t\tc=0\n\t\tz=n\n\t\twhile 1:\n\t\t\tif z%i==0:\n\t\t\t\tc+=1\n\t\t\t\tz/=i\n\t\t\telse:\n\t\t\t\tbreak\n\t\tres.append([i,c])\n\treturn res\ndef fact(n):\n\tans = 1\n\tm=n\n\tfor _i in range(n-1):\n\t\tans*=m\n\t\tm-=1\n\treturn ans\ndef comb(n,r):\n\tif n<r:\n\t\treturn 0\n\tl = min(r,n-r)\n\tm=n\n\tu=1\n\tfor _i in range(l):\n\t\tu*=m\n\t\tm-=1\n\treturn u//fact(l)\ndef combmod(n,r,mod):\n\treturn (fact(n)/fact(n-r)*pow(fact(r),mod-2,mod))%mod\ndef printQueue(q):\n\tr=copyQueue(q)\n\tans=[0]*r.qsize()\n\tfor i in range(r.qsize()-1,-1,-1):\n\t\tans[i] = r.get()\n\tprint(ans)\nclass UnionFind():\n\tdef __init__(self, n):\n\t\tself.n = n\n\t\tself.parents = [-1]*n\n\n\tdef find(self, x): # root\n\t\tif self.parents[x]<0:\n\t\t\treturn x\n\t\telse:\n\t\t\tself.parents[x] = self.find(self.parents[x])\n\t\t\treturn self.parents[x]\n\n\tdef union(self,x,y):\n\t\tx = self.find(x)\n\t\ty = self.find(y)\n\n\t\tif x==y:\n\t\t\treturn\n\n\t\tif self.parents[x]>self.parents[y]:\n\t\t\tx,y = y,x\n\n\t\tself.parents[x]+=self.parents[y]\n\t\tself.parents[y]=x\n\n\tdef size(self,x):\n\t\treturn -1*self.parents[self.find(x)]\n\n\tdef same(self,x,y):\n\t\treturn self.find(x)==self.find(y)\n\n\tdef members(self,x): # much time\n\t\troot = self.find(x)\n\t\treturn [i for i in range(self.n) if self.find(i)==root]\n\n\tdef roots(self):\n\t\treturn [i for i,x in enumerate(self.parents) if x<0]\n\n\tdef group_count(self):\n\t\treturn len(self.roots())\n\n\tdef all_group_members(self):\n\t\treturn {r: self.members(r) for r in self.roots()} # 1~n\ndef bitArr(n):\n\tx = 1\n\tzero = "0"*n\n\tans = []\n\tans.append([0]*n)\n\tfor i in range(2**n-1):\n\t\tans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))\n\t\tx+=1\n\treturn ans;\ndef arrsSum(a1,a2):\n\tfor i in range(len(a1)):\n\t\ta1[i]+=a2[i]\n\treturn a1\ndef maxValue(a,b,v):\n\tv2 = v\n\tfor i in range(v2,-1,-1):\n\t\tfor j in range(v2//a+1): \n\t\t\tk = i-a*j\n\t\t\tif k%b==0:\n\t\t\t\treturn i\n\treturn -1\ndef copyQueue(q):\n\tnq = queue.Queue()\n\tn = q.qsize()\n\tfor i in range(n):\n\t\tx = q.get()\n\t\tq.put(x)\n\t\tnq.put(x)\n\treturn nq\ndef get_sieve_of_eratosthenes(n):\n\tdata = [2]\n\t#data = [0,0,0]\n\tfor i in range(3,n+1,2):\n\t\tdata.append(i)\n\t\tdata.append(0)\n\tfor i in range(len(data)):\n\t\tinterval = data[i]\n\t\tif interval!=0:\n\t\t\tfor j in range(i+interval,n-1,interval):\n\t\t\t\tdata[j] = 0\n\tans = [x for x in data if x!=0]\n\t\n\treturn ans\n\nx,y = readInts()\n\nif y>=2*x and y<=4*x and y%2==1:\n\tprint("Yes")\nelse:\n\tprint("No")', 'import math\nfrom collections import deque\nfrom collections import defaultdict\nimport itertools as it\n\n\ndef readInt():\n\treturn int(input())\ndef readInts():\n\treturn list(map(int, input().split()))\ndef readChar():\n\treturn input()\ndef readChars():\n\treturn input().split()\ndef factorization(n):\n\tres = []\n\tif n%2==0:\n\t\tres.append(2)\n\tfor i in range(3,math.floor(n//2)+1,2):\n\t\tif n%i==0:\n\t\t\tc = 0\n\t\t\tfor j in res:\n\t\t\t\tif i%j==0:\n\t\t\t\t\tc=1\n\t\t\tif c==0:\n\t\t\t\tres.append(i)\n\tif len(res)==0:\n\t\tres = [n]\n\treturn res\ndef fact2(n):\n\tp = factorization(n)\n\tres = []\n\tfor i in p:\n\t\tc=0\n\t\tz=n\n\t\twhile 1:\n\t\t\tif z%i==0:\n\t\t\t\tc+=1\n\t\t\t\tz/=i\n\t\t\telse:\n\t\t\t\tbreak\n\t\tres.append([i,c])\n\treturn res\ndef fact(n):\n\tans = 1\n\tm=n\n\tfor _i in range(n-1):\n\t\tans*=m\n\t\tm-=1\n\treturn ans\ndef comb(n,r):\n\tif n<r:\n\t\treturn 0\n\tl = min(r,n-r)\n\tm=n\n\tu=1\n\tfor _i in range(l):\n\t\tu*=m\n\t\tm-=1\n\treturn u//fact(l)\ndef combmod(n,r,mod):\n\treturn (fact(n)/fact(n-r)*pow(fact(r),mod-2,mod))%mod\ndef printQueue(q):\n\tr=copyQueue(q)\n\tans=[0]*r.qsize()\n\tfor i in range(r.qsize()-1,-1,-1):\n\t\tans[i] = r.get()\n\tprint(ans)\nclass UnionFind():\n\tdef __init__(self, n):\n\t\tself.n = n\n\t\tself.parents = [-1]*n\n\n\tdef find(self, x): # root\n\t\tif self.parents[x]<0:\n\t\t\treturn x\n\t\telse:\n\t\t\tself.parents[x] = self.find(self.parents[x])\n\t\t\treturn self.parents[x]\n\n\tdef union(self,x,y):\n\t\tx = self.find(x)\n\t\ty = self.find(y)\n\n\t\tif x==y:\n\t\t\treturn\n\n\t\tif self.parents[x]>self.parents[y]:\n\t\t\tx,y = y,x\n\n\t\tself.parents[x]+=self.parents[y]\n\t\tself.parents[y]=x\n\n\tdef size(self,x):\n\t\treturn -1*self.parents[self.find(x)]\n\n\tdef same(self,x,y):\n\t\treturn self.find(x)==self.find(y)\n\n\tdef members(self,x): # much time\n\t\troot = self.find(x)\n\t\treturn [i for i in range(self.n) if self.find(i)==root]\n\n\tdef roots(self):\n\t\treturn [i for i,x in enumerate(self.parents) if x<0]\n\n\tdef group_count(self):\n\t\treturn len(self.roots())\n\n\tdef all_group_members(self):\n\t\treturn {r: self.members(r) for r in self.roots()} # 1~n\ndef bitArr(n):\n\tx = 1\n\tzero = "0"*n\n\tans = []\n\tans.append([0]*n)\n\tfor i in range(2**n-1):\n\t\tans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))\n\t\tx+=1\n\treturn ans;\ndef arrsSum(a1,a2):\n\tfor i in range(len(a1)):\n\t\ta1[i]+=a2[i]\n\treturn a1\ndef maxValue(a,b,v):\n\tv2 = v\n\tfor i in range(v2,-1,-1):\n\t\tfor j in range(v2//a+1): \n\t\t\tk = i-a*j\n\t\t\tif k%b==0:\n\t\t\t\treturn i\n\treturn -1\ndef copyQueue(q):\n\tnq = queue.Queue()\n\tn = q.qsize()\n\tfor i in range(n):\n\t\tx = q.get()\n\t\tq.put(x)\n\t\tnq.put(x)\n\treturn nq\ndef get_sieve_of_eratosthenes(n):\n\tdata = [2]\n\t#data = [0,0,0]\n\tfor i in range(3,n+1,2):\n\t\tdata.append(i)\n\t\tdata.append(0)\n\tfor i in range(len(data)):\n\t\tinterval = data[i]\n\t\tif interval!=0:\n\t\t\tfor j in range(i+interval,n-1,interval):\n\t\t\t\tdata[j] = 0\n\tans = [x for x in data if x!=0]\n\t\n\treturn ans\n\nx,y = readInts()\n\nif y>=2*x and y<=4*x and y%2==0:\n\tprint("Yes")\nelse:\n\tprint("No")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s728529641', 's778200882', 's946736517']
[9664.0, 9664.0, 9608.0]
[26.0, 22.0, 23.0]
[2897, 2908, 2908]
p02640
u511449169
2,000
1,048,576
There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs. Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.
['import itertools\nx, y = map(int, input().split())\nnum = [i for i in range(1, x + 1)]\ncomb = list(itertools.combinations(num, 2))\nprint(num)\nif y % 4 == 0 and y // 4 == x:\n print("Yes")\n exit()\nelif y % 2 == 0 and y // 2 == x:\n print("Yes")\n exit()\nfor j in comb:\n print(j)\n if j[0] * 4 + j[1] * 2 == y:\n print("Yes")\n exit()\nprint("No")', 'x, y = map(int, input().split())\nnum = [i for i in range(1, x)]\ncomb = []\nfor k in num:\n comb.append([k, x - k])\nif y % 4 == 0 and y // 4 == x:\n print("Yes")\n exit()\nelif y % 2 == 0 and y // 2 == x:\n print("Yes")\n exit()\nfor j in comb:\n if j[0] * 4 + j[1] * 2 == y:\n print("Yes")\n exit()\nprint("No")']
['Wrong Answer', 'Accepted']
['s491760350', 's831808836']
[9212.0, 9212.0]
[24.0, 23.0]
[368, 331]
p02640
u512293334
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 n in range(X+1):\n if 4*X-2*n == Y:\n ans = "YES"\n break\nprint(ans)', 'X, Y = map(int, input().split())\nans = "No"\nfor n in range(X+1):\n if 4*X-2*n == Y:\n ans = "Yes"\n break\nprint(ans)']
['Wrong Answer', 'Accepted']
['s709681152', 's837589771']
[9164.0, 9164.0]
[22.0, 22.0]
[130, 130]
p02640
u515874757
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 a in range(x+1):\n\tfor b in range(x-a+1):\n\t\tif 2*a + 4*b == y:\n\t\t\t\n\t\t\tprint("Yes")\n\t\t\tbreak\n\n \nprint("No")', 'x,y=map(int,input().split())\nz=0\nfor a in range(x+1):\n\tfor b in range(x-a+1):\n\t\tif 2*a + 4*b == y:\n\t\t\tz+=1\nif z = 0:\n\tprint("No")\nelse:\n\tprint("Yes")', 'import sys\nx,y=map(int,input().split())\n\nfor a in range(x+1):\n\tfor b in range(x-a+1):\n\t\tif 2*a + 4*b == y:\n\t\t\t\n\t\t\tprint("Yes")\n\t\t\tbreak\n\telse:\n\t\tcontinue\n\tbreak\n\n \nprint("No")', '\nx,y=map(int,input().split())\n\nfor a in range(x+1):\n\tif 2*a + 4* (x-a)==y:\n \n\t\tprint("Yes")\n\t\texit()\n \nprint("No")']
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s113884311', 's216992633', 's631589470', 's549114180']
[9200.0, 8948.0, 9172.0, 9172.0]
[20.0, 20.0, 25.0, 23.0]
[161, 149, 186, 122]
p02640
u516554284
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,d=map(int,input().split())\nans=0\nfor _ in range(n):\n a,b=map(int,input().split())\n if (a*a+b*b) <= d*d:\n ans+=1\n \nprint(ans)', 'x,y=map(int,input().split())\n\nif y%2 ==1:\n print("No")\nelif 2*x > y:\n print("No")\nelif 4*x < y:\n print("No")\nelse:\n print("Yes")']
['Runtime Error', 'Accepted']
['s280351789', 's014000651']
[9168.0, 9172.0]
[27.0, 23.0]
[134, 132]
p02640
u521323621
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())\nf = False\nfor a in range(x+1):\n for b in range(x-a+1):\n if 2*a + 4*b == y:\n print("Yes")\n f = True\n\nif not f:\n print("No")\n', 'x,y = map(int,input().split())\nf = False\nfor a in range(x+1):\n b=x-a\n if 2*a + 4*b == y:\n if not f:\n print("Yes")\n f = True\n\nif not f:\n print("No")\n']
['Wrong Answer', 'Accepted']
['s949958830', 's243717253']
[9128.0, 9060.0]
[26.0, 30.0]
[169, 164]
p02640
u522945737
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 numpy.linalg import solve\nX, Y = map(int, input().split())\n\nleft=[[1,1],[2,4]]\nright=[X,Y]\n\na=solve(left,right)\n\nif a[0] >=0 and a[1] >= 0 and a[0].is_integer() and a[1].is_integer():\n print("YES")\nelse:\n print("NO")\n', 'from numpy.linalg import solve\nX, Y = map(int, input().split())\n\nleft=[[1,1],[2,4]]\nright=[X,Y]\n\na=solve(left,right)\n\nif a[0] >=0 and a[1] >= 0 and a[0].is_integer() and a[1].is_integer():\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s473436249', 's300440908']
[27512.0, 27360.0]
[142.0, 176.0]
[228, 227]
p02640
u523385176
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())\nimport math\n\n\n\n\n\n\nn=y//2\nif y%2==0 and math.ceil((y//2)/2)>=x:\n print('Yes')\nelse:\n print('No')", "x,y=map(int,input().split())\nimport math\n\n\n\n\n\n\n\n\nif y%2==0 and math.ceil((y/2)/2)<=x and x<=(y/2):\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s485487003', 's205013940']
[9044.0, 9164.0]
[25.0, 24.0]
[344, 433]
p02640
u524513264
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.
['li = list(map(int, input().split()))\nre = "Yes"\nif li[0] * 2 < li[1]:\n re = "No"\nelif li[0] % 2 == 0:\n if li[1] % 2 != 0:\n re = "No"\nelif li[0] % 2 != 0:\n if li[1] % 2 == 0:\n re = "No"\nprint(re)\n ', 'li = list(map(int, input().split()))\nre = "Yes"\nif li[0] * 4 < li[1]:\n re = "No"\nelif li[0] * 2 > li [1]:\n re = "No"\nelif li[1] % 2 != 0:\n re = "No"\nprint(re)\n \n']
['Wrong Answer', 'Accepted']
['s187984431', 's647072241']
[9104.0, 9000.0]
[27.0, 26.0]
[208, 167]
p02640
u524534026
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 for j in range(x+1):\n ans=2*j+4*i\n if ans==y:\n print('YES')\n sys.exit()\nprint('NO')", "import sys\nx,y=map(int,input().split())\nfor i in range(x+1):\n for j in range(x+1):\n ans=2*j+4*i\n if ans==y and i+j==x:\n print('Yes')\n sys.exit()\nprint('No')"]
['Wrong Answer', 'Accepted']
['s655514213', 's950610860']
[9172.0, 9180.0]
[26.0, 19.0]
[184, 195]
p02640
u524870111
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\nstdin = sys.stdin\n\ndef ns(): return stdin.readline().rstrip()\ndef ni(): return int(ns())\ndef na(): return list(map(int, stdin.readline().split()))\n\nimport numpy as np\n\nx = na()\nfor i, xi in enumerate(x):\n if xi==0:\n print(i+1)\n', '\nimport sys\nstdin = sys.stdin\n\ndef ns(): return stdin.readline().rstrip()\ndef ni(): return int(ns())\ndef na(): return list(map(int, stdin.readline().split()))\n\nx, y = na()\nfor t in range(100):\n for k in range(100):\n if x == (t + k) and y == 2*t + 4*k:\n print("Yes")\n quit()\nprint("No")\n\n']
['Wrong Answer', 'Accepted']
['s490763294', 's882709046']
[27136.0, 9188.0]
[113.0, 25.0]
[248, 319]
p02640
u529706830
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(0,X - 1):\n if Y == (2*i + 4*(X - i)):\n ans = "Yes"\nprint(ans)', 'X,Y= map(int, input().split())\nturu = 2\nkame = 4\nexsist = False\nfor i in range(0,X+1):\n for j in reversed(range(0,X+1)):\n print(j)\n print(j-i)\n if Y == (turu* (j - i) + kame*j):\n exsist = True\n break\n\nif exsist:\n print("Yes")\nelse:\n print("No")', "X, Y = map(int, input().split())\nans = 'No'\nfor a in range(X + 1):\n b = X - a\n if 2 * a + 4 * b == Y:\n ans = 'Yes'\nprint(ans)"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s547751723', 's786196302', 's371497610']
[9104.0, 9176.0, 8848.0]
[28.0, 32.0, 27.0]
[128, 296, 138]
p02640
u529737989
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()))\n\nX = a[0]\nY = a[1]\n \nprint((Y-2*X) % 2)\nif (Y-2*X) % 2 == 0 and (Y-2*X) >= 0 and (4*X-Y) % 2 == 0 and (4*X-Y) >= 0:\n\tprint('Yes')\nelse:\n print('No')", "a = list(map(int,input().split()))\nX = a[1]\nY = a[2]\n\nif (Y-2*X) % 2 == 0 and (Y-2*X) >= 0:\n\tprint('Yes')\nelse:\n print('No')", "a = list(map(int,input().split()))\n\nX = a[0]\nY = a[1]\n \nif (Y-2*X) % 2 == 0 and (Y-2*X) >= 0 and (4*X-Y) % 2 == 0 and (4*X-Y) >= 0:\n\tprint('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Runtime Error', 'Accepted']
['s106494064', 's735001417', 's761588520']
[9052.0, 9116.0, 9116.0]
[28.0, 27.0, 30.0]
[186, 127, 167]
p02640
u532141811
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\nturu = (4 * X - Y) / 2\nkame = X - turu\n\nif turu.is_integer() and turu > 0:\n if kame.is_integer() and kame > 0:\n print("Yes")\nelse:\n print("No")\n \nprint(turu, kame)', 'X, Y = map(int, input().split())\n\nfor i in range(1, X + 1):\n f = 2 * i + 4 * (X - 1)\n if f == Y:\n print("Yes")\n break\n else:\n print("No")\n break', 'import sys\nX, Y = map(int, input().split())\n\nif Y % 2 == 1:\n print("No")\n sys.exit()\n\nturu = (4 * X - Y) / 2\nkame = X - turu\n\nif turu >= 0 and kame >= 0:\n print("Yes")\nelse:\n print("No")\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s511081154', 's689293390', 's395762060']
[9184.0, 9172.0, 9176.0]
[23.0, 23.0, 20.0]
[213, 181, 199]
p02640
u532309633
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 solution():\n user_input = input()\n animals, legs = [int(x) for x in user_input.split()]\n\n turtles = (4*animals - legs) / 2\n condition = turtles >= 0 and turtles % 1 == 0 and turtles <= animals\n if condition:\n print("Yes")\n else:\n print("No")', '# accepted \n\ndef solution():\n user_input = input()\n animals, legs = [int(x) for x in user_input.split()]\n\n if 4*animals < legs:\n print("No")\n return\n \n if 2*animals > legs:\n print("No")\n return\n\n turtles = animals \n cranes = 0 \n\n while cranes <= animals:\n if 4*turtles + 2*cranes == legs:\n print("Yes")\n return\n \n turtles -= 1\n cranes += 1\n\n print("No")', 'def solution():\n user_input = input()\n animals, legs = [int(x) for x in user_input.split()]\n\n turtles = (4*animals - legs) / 2\n if turtles >= 0:\n print("Yes")\n else:\n print("No")', 'def solution():\n user_input = input()\n animals, legs = [int(x) for x in user_input.split()]\n\n turtles = (4*animals - legs) / 2\n if turtles >= 0 and turtles % 1 == 0:\n print("Yes")\n else:\n print("No")', 'def solution():\n user_input = input()\n animals, legs = [int(x) for x in user_input.split()]\n\n turtles = (4*animals - legs) / 2\n condition = turtles >= 0 and turtles <= animals and turtles % 1 == 0 \n if condition:\n print("Yes")\n else:\n print("No")\n\nsolution()']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s092470332', 's763671471', 's945353955', 's982726975', 's469932893']
[9036.0, 9060.0, 9080.0, 9104.0, 9176.0]
[25.0, 30.0, 26.0, 27.0, 31.0]
[277, 458, 207, 228, 290]
p02640
u536685012
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 = 0\n\nfor i in range(0, x-1):\n rest = y - 2 * i\n if rest / (x - i) == 4:\n print('Yes')\n ans = 1\n break\n\nif ans == 0:\n print('No')\n", "x, y = map(int, input().split())\n\nans = 0\n\nfor i in range(0:x + 1):\n rest = y - 2 * i\n if rest % 4 == 0:\n print('Yes')\n ans = 1\n break\n\nif ans == 0:\n print('No')\n", "x, y = map(int, input().split())\n\nans = 0\n\nfor i in range(0, x + 1):\n # i is the number of the crane\n rest = y - (2 * i)\n if rest / 4 == x - i:\n print('Yes')\n ans = 1\n break\n\nif ans == 0:\n print('No')\n"]
['Wrong Answer', 'Runtime Error', 'Accepted']
['s701151299', 's867363149', 's319692019']
[9100.0, 8956.0, 9104.0]
[31.0, 26.0, 29.0]
[179, 174, 214]
p02640
u537217069
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\na = Y/2 - X\nb = -Y/2 + 2*X\n\nflag = False\nif(a >= 0 and b >=0):\n flag = True\n\nif flag:\n print('yes')\nelse:\n print('no')", "X, Y = list(map(int, input().split()))\n\na = Y/2 - X\nb = -Y/2 + 2*X\n\na = round(a)\nb = round(b)\n\nflag = False\nif(a >= 0 and b >=0):\n if(a + b == X and 4*a + 2*b == Y):\n flag = True\n\nif flag:\n print('yes')\nelse:\n print('No')", "X, Y = list(map(int, input().split()))\n\na = Y/2 - X\nb = -Y/2 + 2*X\n\na = round(a)\nb = round(b)\n\nflag = False\nif(a >= 0 and b >=0):\n if(a + b == X and 4*a + 2*b == Y):\n flag = True\n\nif flag:\n print('Yes')\nelse:\n print('No')\n\n"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s345707791', 's739873408', 's123000432']
[8924.0, 9180.0, 9132.0]
[27.0, 33.0, 28.0]
[167, 237, 369]
p02640
u538537141
2,000
1,048,576
There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs. Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.
['X,Y=map(int,input().split())\n\n\nl=list(range(2*X,4*X+2,2))\nprint(l)\n\nflag=False\nfor i in range(len(l)):\n if l[i]==int(Y):\n flag=True\n\nif flag:\n print("Yes")\nelse:\n print("No")', 'X,Y=map(int,input().split())\n\n\nl=list(range(2*X,4*X+2,2))\n#print(l)\n\nflag=False\nfor i in range(len(l)):\n if l[i]==int(Y):\n flag=True\n\nif flag:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s134396943', 's920746946']
[9184.0, 9180.0]
[22.0, 20.0]
[190, 191]
p02640
u540746268
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\na=b=0\n\n\nif x*4<y or x*2>y:\n print('No')\n exit()\n\nif (y-2*x)%2==0:\n n=(y-2*x)/2\n if x-b>=0:\n\n print('鶴',x-b)\n print('亀',n)\n\n print('Yes')\nelse:\n print('No')", "x, y = map(int, input().split())\n\na=b=0\n\n\nif x*4<y or x*2>y:\n print('No')\n exit()\n\nif (y-2*x)%2==0:\n n=(y-2*x)/2\n if x-b>=0:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s692470454', 's056195787']
[9128.0, 9184.0]
[22.0, 21.0]
[229, 179]
p02640
u542739769
2,000
1,048,576
There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs. Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.
['\nX,Y = map(int, input().split())\n\n\nkame = 4\nturu = 2\n\n\nif Y == 2 and X == 1:\n print("Yes")\nelif Y == 100 and X*kame < Y:\n print("No")\nelif Y % turu != 0:\n print("No")\nelif X*2 < Y:\n print("No")\nelse:\n ans = Y\n while True:\n Y = Y % 2\n ans = ans/2\n if Y != 0:\n print("No")\n break\n elif Y == 0 and ans == 0:\n print("Yes")\n break ', '\nX,Y = map(int, input().split())\n\n\nkame = 4\nturu = 2\n\n\nif Y == 2 and X == 1:\n print("Yes")\nelif Y == 100 and X*kame < Y:\n print("No")\nelif Y % turu != 0:\n print("No")\nelif X*kame < Y:\n print("No")\nelse:\n ans = Y\n while True:\n Y = Y % 2\n ans = ans/2\n if Y != 0:\n print("No")\n break\n elif Y == 0 and ans == 0:\n print("Yes")\n break \n else:\n print("No")', 'import sys\n\nX,Y = map(int, input().split())\n\n\nfor i in range(100):\n for j in range(100):\n if i + j == X and 4*i + 2*j == Y:\n print("Yes")\n sys.exit()\n\nprint("No")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s263649655', 's805559376', 's777480761']
[9200.0, 9220.0, 9168.0]
[22.0, 23.0, 26.0]
[545, 576, 299]
p02640
u546236742
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.
['number = input()\nlist = number.split()\nif int(list[1]) % 3 == 0 or int(list[0]) * 4 < int(list[1]):\n print("No")\nelse:\n a = 0\n for i in range(int(list[0])):\n a = i\n n = i + 1\n n2 = int(list[0] - n)\n if n * 2 + n2 * 4 == int(list[1]):\n print("Yes")\n break\n if a == int(list[0]) - 1:\n print("No")', 'number = input()\nlist = number.split()\n\n\ndef hoge(a, b):\n if a * 4 < b:\n print("No")\n return\n else:\n for i in range(a):\n n = i + 1\n n2 = a - n\n if n * 2 + n2 * 4 == b:\n print("Yes")\n return\n else:\n if a * 4 == b:\n print("Yes")\n return\n print("No")\n\n\nhoge(int(list[0]), int(list[1]))']
['Runtime Error', 'Accepted']
['s861242417', 's775316310']
[9140.0, 9196.0]
[22.0, 25.0]
[361, 431]
p02640
u550146922
2,000
1,048,576
There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs. Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.
['x,y = map(int,input()split())\n\n\nif i in range(x):\n if y == 4x-2a:\n print("Yes")\nelse:\n print("No")', 'import sys\nx,y = map(int,input().split())\n\n#2a+4b =y\n#a+b =x\n#b=x-a\n#y =2a+4(x-a)=4x-2a\n\nfor i in range(x+1):\n if y == 4*x-2*i:\n print("Yes")\n sys.exit()\nelse:\n print("No")\n\n ']
['Runtime Error', 'Accepted']
['s990178159', 's017541619']
[8716.0, 9040.0]
[24.0, 27.0]
[111, 198]
p02640
u552533086
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 if 2*i +4(X - i) == Y:\n print("Yes")\n else:\n print("No")\n', 'X, Y = map(int, input().split())\n\nfor i in range(X+1):\n if (2*i + 4*(X - i)) == Y:\n print("Yes")\n break\n else:\n print("No")\n break\n', 'X, Y = map(int, input().split())\n\nfor i in range(X+1):\n if (2*i + 4*(X - i)) == Y:\n print("Yes")\n break\nelse:\n print("No")']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s317595012', 's430752260', 's138859531']
[9160.0, 9184.0, 9168.0]
[24.0, 23.0, 19.0]
[133, 165, 142]
p02640
u553308611
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())\nk = Y/2\nq = y/4\nif q<=X and X <= k:\n print("Yes")\nelse:\n print("No")\n', 'X, Y = map(int, input().split())\nk = Y/2\nq = y/4\nif q<=X and X <= k:\n print("Yes")\nelse:\n print("No")\n', 'X, Y = map(int, input().split())\nif Y % 2 == 1:\n print("No")\nelse:\n k = Y/2\n q = Y/4\n if q <= X and X <= k:\n print("Yes")\n else:\n print("No")\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s739220459', 's998970039', 's096099717']
[9156.0, 9092.0, 9176.0]
[21.0, 22.0, 24.0]
[108, 108, 171]
p02640
u553600587
2,000
1,048,576
There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs. Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.
['\nX, Y = [int(x) for x in input().strip().split(" ")]\n\nif Y % 2 == 1:\n print("No")\nelse:\n turtles = (Y - 2 * X) // 2\n cranes = (4 * X - Y) // 2\n print(cranes, turtles)\n if (0 <= turtles <= X) and (0 <= cranes <= X):\n print("Yes")\n else:\n print("No")', '\nX, Y = [int(x) for x in input().strip().split(" ")]\n\nif Y % 2 == 1:\n print("No")\nelse:\n turtles = (Y - 2 * X) // 2\n cranes = (4 * X - Y) // 2\n if (0 <= turtles <= X) and (0 <= cranes <= X):\n print("Yes")\n else:\n print("No")']
['Wrong Answer', 'Accepted']
['s137256764', 's574703616']
[9188.0, 9184.0]
[22.0, 24.0]
[309, 282]
p02640
u554237650
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.
['str1 = input()\n\nA = str1.split(" ")\n\n\nall4 = int(A[0])*4\nres = "NO"\n\nfor i in range(0, int(A[0])+1):\n if all4 == int(A[1]):\n res = "YES"\n break\n else:\n all4 = all4 - 2\n \nprint(res)', 'str1 = input()\n\nA = str1.split(" ")\n\n\nall4 = int(A[0])*4\nres = "No"\n\nfor i in range(0, int(A[0])+1):\n if all4 == int(A[1]):\n res = "Yes"\n break\n else:\n all4 = all4 - 2\n \nprint(res)']
['Wrong Answer', 'Accepted']
['s810830573', 's114267006']
[9152.0, 9180.0]
[24.0, 25.0]
[259, 259]
p02640
u555458045
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())\nif (y-x) > =x:\n print "Yes"\nelse:\n print "No"', 'x, y = map(int, input().split())\nif (y-x) > =x:\n print "Yes"\nelse:\n print "No"', 'x, y = map(int, input().split())\nif y%2 == 1:\n print("No")\n exit()\nb = y//2 -x\na = x - b\nif (a >= 0) & (b >= 0):\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Runtime Error', 'Accepted']
['s740248811', 's922240120', 's728729062']
[8908.0, 8944.0, 9112.0]
[26.0, 25.0, 28.0]
[72, 80, 149]
p02640
u556589653
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 = (4x-y)/2\nb = (-2x+y)/2\nif a%1 == 0 and 0 <= aand b%1 == 0 and 0 <=b:\n print("Yes")\nelse:\n print("No")', 'x,y = int(input())\nflag = 0\nfor i in range(x+1):\n if (y - 2*i)%4 == 0 and (y - 2 * i)//4 == x - i:\n flag += 1\n print("Yes")\n break\nif flag == 0:\n print("No")', 'x,y = map(int,input().split())\na = (4*x-y)/2\nb = (-2*x+y)/2\nif a%1 == 0 and 0 <= a and b%1 == 0 and 0 <=b:\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s011491967', 's718251460', 's165549726']
[8956.0, 9052.0, 9064.0]
[20.0, 24.0, 28.0]
[138, 169, 142]
p02640
u557792847
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\nimport math\nfrom collections import deque \nfrom functools import reduce\n\n# input = sys.stdin.readline\n\nx, y = map(int, input().split())\n\nx2 = y // 2\nxe = y // 4\n\nif (x <= x2 and x >= xe):\n if (x % 2 == 0):\n print("Yes")\n else:\n print("No")\nelse:\n print("No")', 'x, y = map(int, input().split())\nf = False\nfor i in range(x+1):\n for j in range(x+1):\n if (y == (i*2 + j*4)):\n if (x == i + j):\n f = True\n break\n if f:\n breakif f:\n print("Yes")\nelse:\n print("No") \n', 'x, y = map(int, input().split())\nf = False\nfor i in range(x+1):\n for j in range(x+1):\n if (y == (i*2 * j*4)):\n if (x == i + j):\n f = True\n break\nif f:\n print("Yes")\nelse:\n print("No") \n ', 'x, y = map(int, input().split())\nf = False\nfor i in range(x+1):\n for j in range(x+1):\n if (y == (i*2 * j*4)):\n if (x == i + j)\n f = True\n break;\nif f:\n print("Yes")\nelse:\n print("No") \n ', 'x, y = map(int, input().split())\nf = False\nfor i in range(x+1):\n for j in range(x+1):\n if (y == (i*2 * j*4)):\n if (x == i + j):\n f = True\n break;\nif f:\n print("Yes")\nelse:\n print("No") \n ', 'x, y = map(int, input().split())\nf = False\nfor i in range(x+1):\n if i*2 + (x-i)*4 == y:\n f = True\n break\nif f:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s138104136', 's150297959', 's218673945', 's436970870', 's961581993', 's565051508']
[27156.0, 9032.0, 9184.0, 9032.0, 9184.0, 9112.0]
[115.0, 23.0, 22.0, 24.0, 22.0, 23.0]
[311, 276, 265, 265, 266, 166]
p02640
u559367141
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 if (2*i + 4*(x - i)) == y:\n print('Yes')\n break\n else:\n print('No')\n", "X,Y = map(int,input().split())\n \n\nfor x in range(X+1):\n if (2*x + 4*(X-x)) == Y:\n print('Yes')\n break\nprint('No')", "X,Y = map(int,input().split())\n \nresult = 'No'\nfor x in range(X+1):\n if (2*x + 4*(X-x)) == Y:\n result = 'Yes'\n break\nprint(result)"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s010065033', 's356312535', 's083404127']
[9084.0, 9040.0, 9148.0]
[29.0, 26.0, 29.0]
[151, 130, 147]
p02640
u560222605
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())\nif a*2<=b and a*4>=b:\n print('YES')\nelse:\n print('NO')\n", "a,b=map(int,input().split())\nn=0\nfor i in range(a+1):\n if 2*i+4*(a-i)==b:\n n+=1\n else:\n n==n\nif n==1:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s509429674', 's723637610']
[9156.0, 9064.0]
[20.0, 20.0]
[90, 160]
p02640
u561743922
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.
['totalNum, totalFoot = map(int, input().split())\n\nif totalFoot <= totalNum * 4:\n flg = False\n for i in range(totalNum + 1):\n craneNum = i\n turtleNum = totalNum - i\n foot = (craneNum * 2) + (turtleNum * 4)\n\n if foot == totalFoot:\n flg = True\n print("YES")\n break\n \n if not flg:\n print("NO")\nelse:\n print("NO")', 'totalNum, totalFoot = map(int, input().split())\n\nif totalFoot <= totalNum * 4:\n flg = False\n for i in range(totalNum + 1):\n craneNum = i\n turtleNum = totalNum - i\n foot = (craneNum * 2) + (turtleNum * 4)\n\n if foot == totalFoot:\n flg = True\n print("Yes")\n break\n \n if not flg:\n print("No")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s827070304', 's675758477']
[9212.0, 9184.0]
[26.0, 23.0]
[390, 390]
p02640
u562400059
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\nmax = X * 4\n\nif Y > max:\n print('No')\nelif Y % 2 != 0:\n print('No')\nelse:\n for i in range(2*X, 4*X+1, 2):\n print(i)\n if i == Y:\n print('Yes')\n break\n else:\n print('No')\n", "X, Y = map(int, input().split())\n\nmax = X * 4\n\nif Y > max:\n print('No')\nelif Y % 2 != 0:\n print('No')\nelse:\n for i in range(2*X, 4*X+1, 2):\n if i == Y:\n print('Yes')\n break\n else:\n print('No')\n"]
['Wrong Answer', 'Accepted']
['s831450846', 's920604778']
[9112.0, 9172.0]
[21.0, 20.0]
[258, 241]
p02640
u562869375
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.
['animal,leg = [int(x) for x in input().split()]\n# crane + turtle = animal\n\nimport numpy as np\nA = np.array([\n [1,1],\n [2,4]\n])\nB = np.array([\n [animal],\n [leg]\n])\nA_inv = np.linalg.inv(A)\nans = A_inv.dot(B)\nprint(ans)\nresult = 0\nfor a in ans:\n for b in a:\n if b<0 or type(b) != int:\n result = 1\n break\nif result:\n print("No")\nelse:\n print("Yes")\n# print(ans)', 'animal,leg = [int(x) for x in input().split()]\n# crane + turtle = animal\n\nimport numpy as np\nA = np.array([\n [1,1],\n [2,4]\n])\nB = np.array([\n [animal],\n [leg]\n])\nA_inv = np.linalg.inv(A)\nans = A_inv.dot(B)\nprint(ans)\nresult = 0\nfor a in ans:\n for b in a:\n if b<0 or not b.is_integer():\n result = 1\n break\nif result:\n print("No")\nelse:\n print("Yes")\n# print(ans)', 'animal,leg = [int(x) for x in input().split()]\n# crane + turtle = animal\n\nimport numpy as np\nA = np.array([\n [1,1],\n [2,4]\n])\nB = np.array([\n [animal],\n [leg]\n])\nA_inv = np.linalg.inv(A)\nans = A_inv.dot(B)\nresult = 0\nfor a in ans:\n for b in a:\n if b<0 or not b.is_integer():\n result = 1\n break\nif result:\n print("No")\nelse:\n print("Yes")\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s269619185', 's959623018', 's701197884']
[27604.0, 27636.0, 27616.0]
[1902.0, 868.0, 110.0]
[433, 437, 414]
p02640
u563697328
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 = tuple(map(int, input().split()))\n\nif y > x*4:\n print('NO')\nelif y < x*2:\n print('NO')\nelif y % 2 == 0:\n print('YES')\nelse:\n print('NO')\n", "x, y = tuple(map(int, input().split()))\n\nif y > x*4:\n print('No')\nelif y < x*2:\n print('No')\nelif y % 2 == 0:\n print('Yes')\nelse:\n print('No')\n"]
['Wrong Answer', 'Accepted']
['s311561904', 's064448083']
[9160.0, 9156.0]
[21.0, 21.0]
[155, 155]
p02640
u564097049
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(0, N+1):\n f = i * 2 + (N-i) * 4\n if f == M:\n print("yes")\n break\nelse:\n print("Np")', 'X, Y = map(int, input().split())\nfor i in range(0, X+1):\n f = 2 * i + 4 * (X - i)\n if f == Y:\n print("Yes")\n break\n else:\n print("No")', 'N, M = map(int, input().split())\nfor i in range(0, N+1):\n f = 2 * i + 4* (N-i)\n if f == M:\n print("Yes")\n break\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s345949880', 's762954596', 's278523516']
[9080.0, 9172.0, 9168.0]
[27.0, 25.0, 24.0]
[141, 164, 139]
p02640
u566297428
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'\nif a in range(X + 1):\n b = X - a\n if 2 * a + 4 * b == Y:\n ans = 'Yes'\n print('Yes')\n", "X, Y = map(int, input().split())\n \nans = 'No'\nif a in range(X + 1):\n b = X - a\n if 2 * a + 4 * b == Y:\n ans = 'Yes'\nprint(ans)", "X, Y = map(int, input().split())\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)"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s129629372', 's545823122', 's785970083']
[9092.0, 9124.0, 9064.0]
[25.0, 27.0, 28.0]
[149, 139, 140]
p02640
u566574814
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\na = 2\nb = 4\n\nlista=[]\nlistb=[]\n\nfor i in range(101):\n if i %2 == 0:\n lista.append(i)\n\nfor j in range(101):\n if j % 4 == 0:\n listb.append(j)\n\n\nif y == b*x:\n print('Yes')\nelif y == a*x:\n print('Yes')\nelse:\n print('No')", "x,y = map(int,input().split())\n\nfor i in range(100):\n for j in range(100):\n if i+j == x and i*2+j*4==y:\n print('Yes')\n exit()\n\nprint('No')\n\n\n\n# a = 2\n# b = 4\n\n# lista=[]\n# listb=[]\n\n\n\n\n\n# for j in range(101):\n# if j % 4 == 0:\n# listb.append(j)\n\n\n\n# print('Yes')\n\n# print('Yes')\n# else:\n# print('No')"]
['Wrong Answer', 'Accepted']
['s866449426', 's556875777']
[9084.0, 9172.0]
[20.0, 23.0]
[277, 451]
p02640
u570391873
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())\nif a*2 == b or a*4==b:\n print("Yes")\nelif b%2==0 and y -2*a >= 0 and 4*a-b>=0:\n print("Yes")\nelse:\n print("No")', 'a,b = map(int, input().split())\nif a*2 == b or a*4==b:\n print("Yes")\nelif b%2==0 and b -2*a >= 0 and 4*a-b>=0:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s100724144', 's231571025']
[9024.0, 9004.0]
[26.0, 27.0]
[152, 152]
p02640
u571210910
2,000
1,048,576
There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs. Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.
["import numpy as np\n\nX, Y = map(int, input().split())\n\ncranes = np.arange(X) * 2\nturtles = (np.arange(X)*4).reshape(-1,1)\n\ntotal = cranes + turtles\n\nif np.any(total == Y):\n print('Yes')\nelse:\n print('No)\n \n ", "import numpy as np\n\nX, Y = map(int, input().split())\n\ncranes = np.arange(X+1) * 2\nturtles = (np.arange(X+1)*4).reshape(-1,1)\n\ntotal = np.diag(np.fliplr(cranes + turtles))\n\n\nif np.any(total == Y):\n print('Yes')\nelse:\n print('No')\n "]
['Runtime Error', 'Accepted']
['s743559270', 's712781586']
[9044.0, 27328.0]
[23.0, 112.0]
[227, 251]
p02640
u571840899
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 a in range(X + 1):\n\tb = X - a\n\tif 2 * a + 4 * b == Y:\n\t\tans = 'Yes'\n7 print(ans)", "X, Y = map(int, input().split())\nans = 'No'\nfor a in range(X + 1):\n\tb = X - a\n\tif 2 * a + 4 * b == Y:\n\t\tans = 'Yes'\nprint(ans)"]
['Runtime Error', 'Accepted']
['s504924069', 's291951541']
[9004.0, 9144.0]
[29.0, 27.0]
[128, 126]
p02640
u575962824
2,000
1,048,576
There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs. Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.
["x, y = map(int, input().split())\nfor i in range(x):\n j = x - i;\n print(i,j)\n if 2*i + 4*j == y or 2*j + 4*i == y:\n print('Yes')\n exit()\nprint('No')", "x, y = map(int, input().split())\nif x == 1 and (y == 2 or y ==4):\n print('Yes')\n exit()\nfor i in range(x):\n j = x - i;\n print(i,j)\n if 2*i + 4*j == y:\n print('Yes')\n exit()\nprint('No')", "x, y = map(int, input().split())\nans = 'No'\nfor i in range(x+1):\n j = x - i\n if 2*i + 4*j == y:\n ans = 'Yes'\nprint(ans)"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s023636043', 's152826492', 's137199200']
[9180.0, 9176.0, 9168.0]
[23.0, 21.0, 25.0]
[175, 218, 132]
p02640
u579025969
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=[int(n) for n in input().split()]\nif(m>(n*4) or m<(n*2)):\n print("No")\nelse:\n if(m%2==0):\n print("Yes"):\n else:\n print("No")', 'n,m=[int(n) for n in input().split()]\nif(m>(n*4) or m<(n*2)):\n print("No")\nelse:\n if(m%2==0):\n print("Yes")\n else:\n print("No")']
['Runtime Error', 'Accepted']
['s773718050', 's057234227']
[8964.0, 9200.0]
[21.0, 22.0]
[137, 136]
p02640
u582396808
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.
['num, legs = map(int, input().split())\n\nflag = 1\ntmp = num * 4\nfor i in range(num+1):\n if(tmp == legs):\n print("Yes")\n flag = 0\n else:\n tmp -= 2\nif(flag == 1):\n print("No")', 'num, legs = map(int, input().split())\n\nflag = 1\ntmp = num * 4\nfor i in range(num+1):\n if(tmp == legs):\n print("Yes")\n flag = 0\n break\n else:\n tmp -= 2\nif(flag == 1):\n print("No")']
['Wrong Answer', 'Accepted']
['s042411263', 's722325637']
[9180.0, 9172.0]
[23.0, 23.0]
[201, 215]
p02640
u582489208
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()))\nSum = X+Y\nif Sum%4 == 0:\n print("Yes")\nelse:\n print("NO")', 'x, y=map(int, input().split())\nend = False\nfor i in range(x+1):\n if 4*i + 2*(x-i) == y:\n print("Yes")\n end = True\n break\nif end == False:\n print("No")']
['Wrong Answer', 'Accepted']
['s294235434', 's863555798']
[9164.0, 9176.0]
[18.0, 28.0]
[102, 177]
p02640
u583200093
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())\nisOK = False\nkame = 0\nturu = int(Y/2)\nif turu == X:\n isOK = True\nfor i in range(turu-X):\n if turu != X:\n kame = kame + 1\n turu = turu - 2\n if (turu+kame) == X:\n isOK = True\n break\nif isOK == True:\n print('YES')\nelse:\n print('NO')", "X,Y = map(int,input().split())\nisOK = False\nkame = 0\nturu = int(Y/2)\nif turu == X:\n isOK = True\nfor i in range(turu-X):\n if (turu+kame) == X:\n isOK = True\n break\n if turu != X:\n kame = kame + 1\n turu = turu - 2\nif Y%2 == 1:\n isOK=False\nif isOK == True:\n print('Yes')\nelse:\n print('No')", "X,Y = map(int,input().split())\nturu = int(2*X - Y/2)\nkame = int(-X +Y/2)\nif (turu + kame) == X and turu>=0 and kame>=0:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s733587381', 's934612071', 's777569478']
[9192.0, 9200.0, 9156.0]
[22.0, 23.0, 20.0]
[277, 303, 154]
p02640
u583276018
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(map, input().split())\n\nif(2*x <= y <= 4*x and y%2==0):\n print("Yes")\nelse:\n print("No")', 'x, y = int(map, input().split())\n\nif(2*x <= y <= 4*x):\n print("Yes")\nelse:\n print("No")', 'x, y = int(map, input().split())\n\nif((2*x <= y <= 4*x) and (y%2==0)):\n print("Yes")\nelse:\n print("No")\n', 'x, y = int(map, input().split())\n\nif(2*x <= y <= 4*x and y%2==0 and x <= 50):\n print("Yes")\nelse:\n print("No")', 'x, y = map(int, input().split())\n\nif(2*x <= y <= 4*x and y%2==0 and x <= 50):\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s016948690', 's566199648', 's751240220', 's927960475', 's283517791']
[9100.0, 9100.0, 9024.0, 9036.0, 9056.0]
[22.0, 21.0, 24.0, 19.0, 27.0]
[104, 93, 109, 116, 116]
p02640
u584658281
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())\nflg=False\n\nif Y%2!=0 :\n print(\'No\')\n flg=True\nelse:\n for i in range(0,X+1):\n j=X-i\n if i*2+j*4 == Y or j*2+i*4 == Y:\n print(i,j)\n print("Yes")\n flg=True\n break\n\nif flg==False:\n print(\'No\')', 'X,Y=map(int,input().split())\nflg=False\n\nif Y%2!=0 :\n print(\'No\')\n flg=True\nelse:\n for i in range(0,X+1):\n j=X-i\n if i*2+j*4 == Y or j*2+i*4 == Y:\n print("Yes")\n flg=True\n break\n\nif flg==False:\n print(\'No\')']
['Wrong Answer', 'Accepted']
['s414160467', 's910770871']
[9196.0, 9188.0]
[21.0, 20.0]
[287, 264]