buggy_code
stringlengths
11
625k
fixed_code
stringlengths
17
625k
bug_type
stringlengths
2
4.45k
language
int64
0
8
token_count
int64
5
200k
x, y = map(int, input().split()) flag = 0 for i in range(1,x+1): if 2*i + 4*(x-i) == y: flag = 1 print('Yes') break else: continue if flag == 0: print('No')
x, y = map(int, input().split()) flag = 0 for i in range(x+1): if 2*i + 4*(x-i) == y: flag = 1 print('Yes') break else: continue if flag == 0: print('No')
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]]
5
70
import java.io.BufferedReader; import java.io.IOException; import java.io.PrintWriter; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in)); PrintWriter pw = ...
import java.io.BufferedReader; import java.io.IOException; import java.io.PrintWriter; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in)); PrintWriter pw = ...
[["-", 0, 57, 75, 57, 15, 15, 0, 16, 17, 18], ["+", 0, 57, 75, 57, 15, 15, 0, 16, 17, 19]]
3
194
a=0 X,Y=map(int,input().split()) for i in range(1,X+1): for j in range(1,X+1-i): if 2*i+j*4==Y and i+j==X: a=1 if a==1: print('Yes') else: print('No')
a=0 X,Y=map(int,input().split()) for i in range(X+1): for j in range(X+1-i): if 2*i+j*4==Y and i+j==X: a=1 if a==1: print('Yes') else: print('No')
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21], ["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 21]]
5
84
X, Y = map(int, input().split()) ans='No' if Y % 2 == 0 and 0 <= (4 * X - Y) / 2 <= X: ans='Yes' exit() print(ans)
X, Y = map(int, input().split()) ans='No' if Y % 2 == 0 and 0 <= (4 * X - Y) / 2 <= X: ans='Yes' print(ans)
[["-", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]]
5
54
x, y = gets.split.map(&:to_i) a = 4*x-y b = y-2*x puts (a%2==0 && b%2==0) && (a>0 && b>0) ? "Yes" : "No"
x, y = gets.split.map(&:to_i) a = 4*x-y b = y-2*x puts (a%2==0 && b%2==0) && (a>=0 && b>=0) ? "Yes" : "No"
[["-", 15, 738, 12, 739, 0, 738, 31, 738, 17, 47], ["+", 15, 738, 12, 739, 0, 738, 31, 738, 17, 20], ["-", 15, 738, 12, 739, 0, 738, 12, 738, 17, 47], ["+", 15, 738, 12, 739, 0, 738, 12, 738, 17, 20]]
4
59
x,y = map(int,input().split()) ans="No" for i in range(x): if i*2+4*(x-i)==y: ans="Yes" break print(ans)
x,y = map(int,input().split()) ans="No" for i in range(x+1): if i*2+4*(x-i)==y: ans="Yes" break print(ans)
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
54
x, y = map(int, input().split()) flg = -1 for i in range(1, x + 1): if y == -2*i + 4*x: flg = 1 if flg == 1: print('Yes') else: print('No')
x, y = map(int, input().split()) flg = -1 for i in range(x + 1): if y == -2*i + 4*x: flg = 1 if flg == 1: print('Yes') else: print('No')
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]]
5
66
#include <bits/stdc++.h> using namespace std; #define itos(x) to_string(x) #define stoi(x) stoi(x) #define ctoi(x) (x - '0') #define pb(x) push_back(x) #define pf(x) push_front(x) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define sz(x) (int)(x).size() #define ll long long #define...
#include <bits/stdc++.h> using namespace std; #define itos(x) to_string(x) #define stoi(x) stoi(x) #define ctoi(x) (x - '0') #define pb(x) push_back(x) #define pf(x) push_front(x) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define sz(x) (int)(x).size() #define ll long long #define...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
194
x, y =map(int,input().split()) for i in range(x): if i*2 + (x-i)*4 ==y: print('Yes') break else: print('No')
x, y =map(int,input().split()) for i in range(x+1): if (i)*2 + (x-i)*4 ==y: print('Yes') break else: print('No')
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["+", 15, 666, 0, 657, 31, 657, 31, 23, 0, 24], ["+", 15, 666, 0, 657, 31, 657, 31, 23, 0, 25]]
5
54
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, n) for (int i = 1; i <= (int)(n); i++) int main() { int X, Y; cin >> X >> Y; int crane = 2; int turtle = 4; for (int i = 1; i <= X; i++) { if (i * crane + (X - i) * turtle == Y) { cou...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, n) for (int i = 1; i <= (int)(n); i++) int main() { int X, Y; cin >> X >> Y; int crane = 2; int turtle = 4; for (int i = 0; i <= X; i++) { if (i * crane + (X - i) * turtle == Y) { cou...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
102
X, Y = map(int, input().split()) ans = 'No' if Y % 2 != 0: ans = 'No' else: for i in range(X): a = X - i if a * 2 + i * 4 == Y: ans = 'Yes' break print(ans)
X, Y = map(int, input().split()) ans = 'No' if Y % 2 != 0: ans = 'No' else: for i in range(X+1): a = X - i if a * 2 + i * 4 == Y: ans = 'Yes' break print(ans)
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
69
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; (4 * x >= y && y % 2 == 0 && x < y) ? cout << "Yes" : cout << "No"; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; (4 * x >= y && y % 2 == 0 && x <= y / 2) ? cout << "Yes" : cout << "No"; }
[["-", 0, 41, 15, 23, 0, 16, 12, 16, 17, 18], ["+", 0, 41, 15, 23, 0, 16, 12, 16, 17, 19], ["+", 15, 23, 0, 16, 12, 16, 12, 16, 17, 85], ["+", 15, 23, 0, 16, 12, 16, 12, 16, 12, 13]]
1
53
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); String result = "No"; if ((y % 2 == 0) && (y <= 2 * x) && (y >= 4 * x)) { result = "Yes"; } System.out.println(result)...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); String result = "No"; if ((y % 2 == 0) && (y >= 2 * x) && (y <= 4 * x)) { result = "Yes"; } System.out.println(result)...
[["-", 0, 16, 31, 16, 12, 23, 0, 16, 17, 19], ["+", 0, 16, 31, 16, 12, 23, 0, 16, 17, 20], ["-", 15, 15, 0, 16, 12, 23, 0, 16, 17, 20], ["+", 15, 15, 0, 16, 12, 23, 0, 16, 17, 19]]
3
103
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; int main() { int x, y; cin >> x >> y; for (int tsuru = 0; tsuru <= x; tsuru++) { int kame = x - tsuru; if (kame * 4 + tsuru * 2 == y) { cout << "yes" << endl; return 0; } } cout << "No" << en...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; int main() { int x, y; cin >> x >> y; for (int tsuru = 0; tsuru <= x; tsuru++) { int kame = x - tsuru; if (kame * 4 + tsuru * 2 == y) { cout << "Yes" << endl; return 0; } } cout << "No" << en...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
93
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; cin >> X >> Y; if (Y % 2 != 0) { cout << "No" << endl; } else { if ((Y + 0.5) / 4 <= X && X <= Y / 2) { cout << "Yes" << endl; } else { cout << "No" << endl; } } }
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; cin >> X >> Y; if (Y % 2 != 0) { cout << "No" << endl; } else { if ((Y + 2) / 4 <= X && X <= Y / 2) { cout << "Yes" << endl; } else { cout << "No" << endl; } } }
[["-", 31, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 12, 13]]
1
83
x,y = map(int,input().split()) ans = 'No' for i in range(x): tu = i cr = x - i ch = tu*4 + cr*2 if ch == y: ans = 'Yes' break print(ans)
x,y = map(int,input().split()) ans = 'No' for i in range(x+1): tu = i cr = x - i ch = tu*4 + cr*2 if ch == y: ans = 'Yes' break print(ans)
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
61
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<int, int>; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define repr(i, a, b) for (int i = a; i < b; i++) #define each(i, mp) for (auto &i : mp) const int INF = 1001001001; int main() { int x, y; cin >> x >> y; string an...
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<int, int>; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define repr(i, a, b) for (int i = a; i < b; i++) #define each(i, mp) for (auto &i : mp) const int INF = 1001001001; int main() { int x, y; cin >> x >> y; string an...
[["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]]
1
129
x,y = map(int, input().split()) print("Yes" if (x % 2 == 0) and y >= 2*x and y <= 4*x else "No")
x,y = map(int, input().split()) print("Yes" if (y % 2 == 0) and y >= 2*x and y <= 4*x else "No")
[["-", 31, 679, 31, 23, 0, 666, 0, 657, 31, 22], ["+", 31, 679, 31, 23, 0, 666, 0, 657, 31, 22]]
5
46
a,b = map(int,input().split()) c="入力が間違っています。" d="鶴が" e="匹で、亀が" f="匹です。" k=b//2-a t=2*a-b//2 if k<0 or t<0 or b%2!=0: print('Yes') else: print('No')
a,b = map(int,input().split()) c="入力が間違っています。" d="鶴が" e="匹で、亀が" f="匹です。" k=b//2-a t=2*a-b//2 if k<0 or t<0 or b%2!=0: print('No') else: print('Yes')
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
81
#include <iostream> using namespace std; void solve() { int n, d; cin >> n >> d; if (d % n == 1) cout << "No" << endl; else if (n * 2 <= d && d <= n * 4) cout << "Yes" << endl; else cout << "No" << endl; return; } int main() { solve(); return 0; }
#include <iostream> using namespace std; void solve() { int n, d; cin >> n >> d; if (d % 2 == 1) cout << "No" << endl; else if (n * 2 <= d && d <= n * 4) cout << "Yes" << endl; else cout << "No" << endl; return; } int main() { solve(); return 0; }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
86
function Main(input) { var tmp = input.split(" "); var num = parseInt(tmp[0]); var leg = parseInt(tmp[1]); if (leg % 2 === 1) { console.log("No"); } else { if (num * 2 <= leg && leg <= leg * 2) { console.log("Yes"); } else { console.log("no"); } } } Main(require("fs").readFileSy...
function Main(input) { var tmp = input.split(" "); var num = parseInt(tmp[0]); var leg = parseInt(tmp[1]); if (leg % 2 === 1) { console.log("No"); } else { if (num * 2 <= leg && leg <= num * 4) { console.log("Yes"); } else { console.log("No"); } } } Main(require("fs").readFileSy...
[["-", 15, 23, 0, 16, 12, 16, 12, 16, 31, 22], ["+", 15, 23, 0, 16, 12, 16, 12, 16, 31, 22], ["-", 15, 23, 0, 16, 12, 16, 12, 16, 12, 555], ["+", 15, 23, 0, 16, 12, 16, 12, 16, 12, 555], ["-", 0, 1, 0, 2, 3, 3, 0, 557, 0, 491], ["+", 0, 1, 0, 2, 3, 3, 0, 557, 0, 491]]
2
121
#include <iostream> #include <vector> using namespace std; void abc_170a(); void abc_171a(); void abc_172a(); void abc_173a(); void abc_174a(); void abc_175a(); void abc_170b(); int main() { // abc_170a(); // abc_171a(); // abc_172a(); // abc_173a(); // abc_174a(); // abc_175a(); abc_170b(); } void ...
#include <iostream> #include <vector> using namespace std; void abc_170a(); void abc_171a(); void abc_172a(); void abc_173a(); void abc_174a(); void abc_175a(); void abc_170b(); int main() { // abc_170a(); // abc_171a(); // abc_172a(); // abc_173a(); // abc_174a(); // abc_175a(); abc_170b(); } void ...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
426
function Main(input) { input = input.split("\n"); var X = parseInt(input[0].split(" ")[0]); var Y = parseInt(input[0].split(" ")[1]); var ans = "No"; for (var i = 0; i <= X; i++) { if ((Y - 2 * X) % 4 == 0) { var ans = "Yes"; break; } } console.log('%s', ans); return ans; } functio...
function Main(input) { input = input.split("\n"); var X = parseInt(input[0].split(" ")[0]); var Y = parseInt(input[0].split(" ")[1]); var ans = "No"; for (var i = 0; i <= X; i++) { if ((Y - 2 * i) / 4 == X - i) { var ans = "Yes"; break; } } console.log('%s', ans); return ans; } fun...
[["-", 31, 16, 31, 23, 0, 16, 12, 16, 12, 22], ["+", 31, 16, 31, 23, 0, 16, 12, 16, 12, 22], ["-", 0, 57, 15, 23, 0, 16, 31, 16, 17, 109], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 17, 85], ["-", 8, 556, 0, 57, 15, 23, 0, 16, 12, 555], ["+", 0, 57, 15, 23, 0, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 23, 0, 16, 12, 16, 17, 33], ...
2
231
x,y = map(int, input().split()) z = 'No' for i in range(1,x+1): if 2*i + 4*(x-i) == y: z = 'Yes' break print(z)
x,y = map(int, input().split()) z = 'No' for i in range(x+1): if 2*i + 4*(x-i) == y: z = 'Yes' break print(z)
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]]
5
58
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; if (y % 2 == 1) return cout << "No", 0; bool OK = 0; for (int i = 1; i <= x && 2 * i <= y && !OK; ++i) if ((2 * i) + ((x - i) * 4) == y) OK = 1; cout << (OK ? "Yes" : "No"); return 0; }
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; if (y % 2 == 1) return cout << "No", 0; bool OK = 0; for (int i = 0; i <= x && 2 * i <= y && !OK; ++i) if ((2 * i) + ((x - i) * 4) == y) OK = 1; cout << (OK ? "Yes" : "No"); return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
109
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int X = sc.nextInt(); int Y = sc.nextInt(); String ans = "Yes"; if (Y % 2 == 1) { ans = "No"; } if (X * 2 > Y || Y - X * 2 / 2 > X) { ans = "No"; } Syst...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int X = sc.nextInt(); int Y = sc.nextInt(); String ans = "Yes"; if (Y % 2 == 1) { ans = "No"; } if (X * 2 > Y || (Y - X * 2) / 2 > X) { ans = "No"; } Sy...
[["+", 0, 16, 12, 16, 31, 16, 31, 23, 0, 24], ["+", 0, 16, 12, 16, 31, 16, 31, 23, 0, 25]]
3
111
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; for (int i = 0; i <= x; i++) { for (int j = 0; j <= x; j++) { if (i + j == x) { int leg = i * 2 + j * 4; if (leg == y) { cout << "yes" << endl; return 0; } } } } cout...
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; for (int i = 0; i <= x; i++) { for (int j = 0; j <= x; j++) { if (i + j == x) { int leg = i * 2 + j * 4; if (leg == y) { cout << "Yes" << endl; return 0; } } } } cout...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
106
x, y = list(map(int,input().split())) ans = y / 2 - x if y % 2 == 0: print("No") elif ans <= x: print("Yes") else: print("No")
x, y = list(map(int,input().split())) ans = y / 2 - x if y % 2 == 1: print("No") elif 0 <= ans <= x: print("Yes") else: print("No")
[["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 612], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 0, 612], ["+", 0, 656, 0, 57, 75, 665, 15, 666, 0, 612], ["+", 0, 656, 0, 57, 75, 665, 15, 666, 667, 19]]
5
58
x, y = list(map(int,input().split())) ans = y / 2 - x if y % 2 == 0 and 1 <= ans <= x: print("Yes") else: print("No")
x, y = list(map(int,input().split())) ans = y / 2 - x if y % 2 == 0 and 0 <= ans <= x: print("Yes") else: print("No")
[["-", 0, 656, 0, 57, 15, 679, 12, 666, 0, 612], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 612]]
5
53
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; for (int i = 0; i <= x; i++) { if ((2 * x - y / 2) == i) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; return 0; }
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; for (int i = 0; i <= x; i++) { if ((4 * x - 2 * i) == y) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; return 0; }
[["-", 51, 16, 31, 23, 0, 16, 31, 16, 31, 13], ["+", 51, 16, 31, 23, 0, 16, 31, 16, 31, 13], ["-", 51, 16, 31, 23, 0, 16, 12, 16, 31, 22], ["-", 51, 16, 31, 23, 0, 16, 12, 16, 17, 85], ["+", 51, 16, 31, 23, 0, 16, 12, 16, 17, 48], ["+", 51, 16, 31, 23, 0, 16, 12, 16, 12, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22]...
1
77
x,y=gets.chomp.split(" ").map(&:to_i); kame = (y - (x*2))/2 turu = x - kame p kame p turu if kame >= 0 && turu >= 0 && (4*kame+2*turu) == y print 'Yes' else print 'No' end
# x,y=gets.chomp.split(" ").map(&:to_i); kame = (y - (x*2))/2 turu = x - kame if kame >= 0 && turu >= 0 && (4*kame+2*turu) == y print 'Yes' else print 'No' end
[["-", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["-", 36, 36, 0, 493, 0, 652, 3, 4, 0, 22]]
4
73
#include <algorithm> #include <iostream> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int x, y; cin >> x >> y; rep(i, x) { if (2 * i + 4 * (x - i) == y) { cout << "Yes "; exit(1); } } cout << "No" << endl; return 0; }
#include <algorithm> #include <iostream> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i <= (int)(n); i++) int main() { int x, y; cin >> x >> y; rep(i, x) { if (2 * i + 4 * (x - i) == y) { cout << "Yes "; return 0; } } cout << "No" << endl; return 0; }
[["-", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59], ["-", 0, 57, 64, 9, 0, 1, 0, 2, 63, 22], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 38], ["+", 8, 9, 0, 57, 64, 9, 0,...
1
83
x, y = list(map(int, input().split())) end = False for i in range(x+1): if 4*i + 2*(x-1) == y: print("Yes") end = True break if end == False: print("No")
x, y=map(int, input().split()) end = False for i in range(x+1): if 4*i + 2*(x-i) == y: print("Yes") end = True break if end == False: print("No")
[["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25], ["-", 0, 657, 12, 657, 12, 23, 0, 657, 12, 612], ["+", 0, 657, 12, 657, 12, 23, 0, 657, 12, 22]]
5
68
#include <bits/stdc++.h> using namespace std; int main() { int a, b; cin >> a >> b; if (b <= 2 * a || b >= 4 * a || b % 2 == 1) cout << "No" << endl; else cout << "Yes" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int a, b; cin >> a >> b; if (b < 2 * a || b > 4 * a || b % 2 == 1) cout << "No" << endl; else cout << "Yes" << endl; return 0; }
[["-", 15, 339, 51, 16, 31, 16, 31, 16, 17, 19], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 18], ["-", 15, 339, 51, 16, 31, 16, 12, 16, 17, 20], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 17, 47]]
1
63
x, y = map(int, input().split()) if y % 2 == 0 and y >= 2*x and y <= 4*x: print('yes') else: print('no')
x, y = map(int, input().split()) if y % 2 == 0 and y >= 2*x and y <= 4*x: print('Yes') else: print('No')
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
49
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int m; cin >> m; if (m % 2 == 0) { if (m <= n * 4 && m >= m * 2) { cout << "Yes"; return 0; } } cout << "No"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int m; cin >> m; if (m % 2 == 0) { if (m <= n * 4 && m >= n * 2) { cout << "Yes"; return 0; } } cout << "No"; return 0; }
[["-", 15, 339, 51, 16, 12, 16, 12, 16, 31, 22], ["+", 15, 339, 51, 16, 12, 16, 12, 16, 31, 22]]
1
70
n,m=map(int,input().split()) if(m%2==1): print("No") elif(2*n<=m and m>=4*n): print("Yes") else: print("No")
n,m=map(int,input().split()) if(m%2==1): print("No") elif(2*n<=m and m<=4*n): print("Yes") else: print("No")
[["-", 75, 665, 15, 23, 0, 679, 12, 666, 667, 20], ["+", 75, 665, 15, 23, 0, 679, 12, 666, 667, 19]]
5
60
x, y = map(int, input().split()) for i in range(x + 1): if (i * 2 + (x - 1) * 4) == y: print('Yes') exit() print('No')
x, y = map(int, input().split()) for i in range(x + 1): if (i * 2 + (x - i) * 4) == y: print('Yes') exit() print('No')
[["-", 0, 657, 12, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 657, 12, 657, 31, 23, 0, 657, 12, 22]]
5
58
x,y=map(int,input().split()) ans=0 for i in range(1,x+1): if i*2+4*(x-i)==y: ans+=1 if ans!=0: print('Yes') else: print('No')
x,y=map(int,input().split()) ans=0 for i in range(0,x+1): if i*2+4*(x-i)==y: ans+=1 if ans!=0: print('Yes') else: print('No')
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]]
5
68
#include <stdio.h> int main(void) { int i, x, y, ans, turu, kame; i = 0; x = 0; y = 0; kame = 0; turu = 0; ans = 0; scanf("%d", &x); scanf("%d", &y); kame = (y - 2 * x) * 4 / 2; turu = (4 * x - y) * 2 / 2; if (4 * x >= y && 2 * x < y && y % 2 == 0) { printf("Yes"); } else { printf("No...
#include <stdio.h> int main(void) { int i, x, y, ans, turu, kame; i = 0; x = 0; y = 0; kame = 0; turu = 0; ans = 0; scanf("%d", &x); scanf("%d", &y); kame = (y - 2 * x) * 4 / 2; turu = (4 * x - y) * 2 / 2; if (4 * x >= y && 2 * x <= y && y % 2 == 0) { printf("Yes"); } else { printf("N...
[["-", 15, 23, 0, 16, 31, 16, 12, 16, 17, 18], ["+", 15, 23, 0, 16, 31, 16, 12, 16, 17, 19]]
0
136
#include <stdio.h> int main(void) { int kame, turu, x, y, i, j, ans = 0; ; scanf("%d%d", &x, &y); //総当たり /* for(kame=0;kame<=x;kame++){ turu=x-kame; if(kame*4+turu*2==y){ans=1;} } if(ans==1){printf("Yes\n");} else{printf("No\n");} */ //条件を求める if (y % 2 == 0 || (x * 2 <= y && y <= x * 4)...
#include <stdio.h> int main(void) { int kame, turu, x, y, i, j, ans = 0; ; scanf("%d%d", &x, &y); //総当たり /* for(kame=0;kame<=x;kame++){ turu=x-kame; if(kame*4+turu*2==y){ans=1;} } if(ans==1){printf("Yes\n");} else{printf("No\n");} */ //条件を求める if (y % 2 == 0 && (x * 2 <= y && y <= x * 4)...
[["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 106], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 98]]
0
89
#include <stdio.h> int main() { int i; int a, x, y; scanf("%d%d", &x, &y); for (i = 0; i < 101; i++) { a = 2 * i + 4 * (x - i); if (a == y) { printf("Yes\n"); return 0; } } printf("No\n"); return 0; }
#include <stdio.h> int main() { int i; int a, x, y; scanf("%d%d", &x, &y); for (i = 0; i < x + 1; i++) { a = 2 * i + 4 * (x - i); if (a == y) { printf("Yes\n"); return 0; } } printf("No\n"); return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 31, 22], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
0
90
x, y = gets.chomp.split().map(&:to_i) b = (y - 2 * x) / 2 if y >= 2 * x && y.even? && x - b > 0 puts 'Yes' else puts 'No' end
x, y = gets.chomp.split().map(&:to_i) b = (y - 2 * x) / 2 if y >= 2 * x && y.even? && x - b >= 0 puts 'Yes' else puts 'No' end
[["-", 0, 493, 0, 121, 15, 738, 12, 738, 17, 47], ["+", 0, 493, 0, 121, 15, 738, 12, 738, 17, 20]]
4
54
x,y = map(int, input().split()) if y-2*x >= 0 and (y-2*x)%2 == 0 and (y-2*x)//2 < x: print("Yes") else: print("No")
x,y = map(int, input().split()) if y-2*x >= 0 and (y-2*x)%2 == 0 and (y-2*x)//2 <= x: print("Yes") else: print("No")
[["-", 0, 656, 0, 57, 15, 679, 12, 666, 667, 18], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 19]]
5
63
#include <algorithm> #include <bits/stdc++.h> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> using namespace std; const int N = 1e5 + 5; #define ll long long #define inf 0x3f3f3f3f #define m...
#include <algorithm> #include <bits/stdc++.h> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> using namespace std; const int N = 1e5 + 5; #define ll long long #define inf 0x3f3f3f3f #define m...
[["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
137
X,Y=map(int,input().split()) now = 4*X end = 2*X while(now>end): if now==Y: print("Yes") exit() now-=2 print("No")
X,Y=map(int,input().split()) now = 4*X end = 2*X while(now>=end): if now==Y: print("Yes") exit() now-=2 print("No")
[["-", 0, 656, 0, 52, 15, 23, 0, 666, 667, 47], ["+", 0, 656, 0, 52, 15, 23, 0, 666, 667, 20]]
5
56
#include <iostream> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using P = pair<int, int>; #include <algorithm> #include <map> #include <math.h> #include <queue> #include <set> int main() { int x, y; cin >> x >> y; if (y < 2 * x) { cout << "No";...
#include <iostream> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using P = pair<int, int>; #include <algorithm> #include <map> #include <math.h> #include <queue> #include <set> int main() { int x, y; cin >> x >> y; if (y < 2 * x) { cout << "No";...
[["-", 0, 57, 15, 339, 51, 16, 12, 16, 31, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 13]]
1
125
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> Pi; #define rep(i, n) for (int i = 0; i < (n); i++) #define rep2(i, n) for (int i = 1; i <= (n); i++) #define rep3(i, i0, n) for (int i = i0; i < (n); i++) #define pb push_back #define mod 1000000007 const ll INF = 1LL << 60; templ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> Pi; #define rep(i, n) for (int i = 0; i < (n); i++) #define rep2(i, n) for (int i = 1; i <= (n); i++) #define rep3(i, i0, n) for (int i = i0; i < (n); i++) #define pb push_back #define mod 1000000007 const ll INF = 1LL << 60; templ...
[["-", 0, 14, 8, 9, 0, 14, 49, 53, 49, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35]]
1
378
x,y=map(int,input().split()) if 2*x<=y and y<=4*x and y&2==0: print("Yes") else: print("No")
x,y=map(int,input().split()) if 2*x<=y and y<=4*x and y%2==0: print("Yes") else: print("No")
[["-", 0, 57, 15, 679, 12, 666, 0, 657, 17, 67], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 17, 109]]
5
49
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); int t; int k; boolean coj = false; if (y % 2 == 0) { t = y / 2; k = y / 4; if (k % 4 != 0) k++; ...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); int t; int k; boolean coj = false; if (y % 2 == 0) { t = y / 2; k = y / 4; if (y % 4 != 0) k++; ...
[["-", 0, 57, 15, 15, 0, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 15, 0, 16, 31, 16, 31, 22], ["-", 8, 196, 0, 57, 64, 1, 0, 492, 141, 22], ["+", 8, 196, 0, 57, 64, 1, 0, 492, 141, 22], ["-", 8, 196, 0, 57, 75, 1, 0, 492, 141, 22], ["+", 8, 196, 0, 57, 75, 1, 0, 492, 141, 22]]
3
138
x, y = list(map(int,input().split())) for i in range(x): n = x - i s = 2 * n + 4 * i if s == y: print("Yes") exit() print("No")
x, y = list(map(int,input().split())) for i in range(x+1): n = x - i s = 2 * n + 4 * i if s == y: print("Yes") exit() print("No")
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
61
#include <bits/stdc++.h> using namespace std; int main() { int num; int leg; cin >> num >> leg; for (int i = 0; i <= num; i++) { int j = num - i, allf = i * 2 + j * 4; if (j == leg) { cout << "Yes" << endl; return 0; } else continue; } cout << "No" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int num, leg; cin >> num >> leg; for (int i = 0; i <= num; i++) { int j = num - i, allf = i * 2 + j * 4; if (allf == leg) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["-", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95], ["-", 8, 9, 0, 57, 75, 76, 0, 116, 0, 117], ["-", 8, 9, 0, 57, 7...
1
90
#include <bits/stdc++.h> #define cina(a, n) \ for (int i = 0; i < n; ++i) { \ cin >> a[i]; \ } #define ll long long #define ld long double usi...
#include <bits/stdc++.h> #define cina(a, n) \ for (int i = 0; i < n; ++i) { \ cin >> a[i]; \ } #define ll long long #define ld long double usi...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
104
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; for (int i = 0; i < x; i++) { int t = x - i; int asi = i * 2 + i * 4; if (asi == y) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; for (int i = 0; i <= x; i++) { int t = x - i; int asi = i * 2 + t * 4; if (asi == y) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 0, 43, 49, 50, 51, 16, 12, 16, 31, 22], ["+", 0, 43, 49, 50, 51, 16, 12, 16, 31, 22]]
1
84
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); ++i) #define MOD 1000000007 using namespace std; using ll = long long; int main() { ll x, y; string ans = "No"; cin >> x >> y; rep(i, x + 1) { ll n = i * 2 + 4 * (x - 1); if (n == y) ans = "Yes"; } cout << ans << endl; ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); ++i) #define MOD 1000000007 using namespace std; using ll = long long; int main() { ll x, y; string ans = "No"; cin >> x >> y; rep(i, x + 1) { ll n = i * 2 + 4 * (x - i); if (n == y) ans = "Yes"; } cout << ans << endl; ...
[["-", 51, 16, 12, 16, 12, 23, 0, 16, 12, 13], ["+", 51, 16, 12, 16, 12, 23, 0, 16, 12, 22]]
1
94
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; cin >> X >> Y; for (int i = 0; i < X; i++) { if (2 * i + 4 * (X - i) == Y) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; cin >> X >> Y; for (int i = 0; i < X + 1; i++) { if (2 * i + 4 * (X - i) == Y) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; }
[["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
76
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); int cou = 0; for (int i = 1; i <= x; i++) { if (y == i * 2 + (x - i) * 4) { cou++; } } if (cou > 0) { ...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); int cou = 0; for (int i = 0; i <= x; i++) { if (y == i * 2 + (x - i) * 4) { cou++; } } if (cou > 0) { ...
[["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499]]
3
128
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int INF = 1e9; int main() { ll T = 1; // cin >> T; while (T--) { int x; int y; cin >> x >> y; int a = y % 2; if (a > 0) { cout << "No" << endl; return 0; } else if (y == x * 4) { cout << "No" << e...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int INF = 1e9; int main() { ll T = 1; // cin >> T; while (T--) { int x; int y; cin >> x >> y; int a = y % 2; if (a > 0) { cout << "No" << endl; return 0; } else if (y > x * 4) { cout << "No" << en...
[["-", 75, 76, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 47]]
1
159
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(void) { int x, y, sum; bool flag; cin >> x >> y; for (int i = 0; i < x; i++) { sum = 2 * i + 4 * (x - i); if (sum == y) { flag = true; break; } } if (flag) { cout << "Yes" << endl; } else { cout <<...
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(void) { int x, y, sum; bool flag = false; cin >> x >> y; for (int i = 0; i <= x; i++) { sum = 2 * i + 4 * (x - i); if (sum == y) { flag = true; break; } } if (flag) { cout << "Yes" << endl; } else { ...
[["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 147], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
107
#include <bits/stdc++.h> using namespace std; using ll = long long; signed main() { int X, Y; cin >> X >> Y; for (int i = 0; i < X; i++) { if (2 * (X - i) + 4 * i == Y) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; using ll = long long; signed main() { int X, Y; cin >> X >> Y; for (int i = 0; i <= X; i++) { if (2 * (X - i) + 4 * i == Y) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
85
import sys x, y = map(int, input().split()) for i in range(1,x + 1): if (i * 2) + ( (x - i) * 4) == y: print('Yes') sys.exit() print('No')
import sys x, y = map(int, input().split()) for i in range(x + 1): if (i * 2) + ( (x - i) * 4) == y: print('Yes') sys.exit() print('No')
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]]
5
66
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; string solve() { int x, y; cin >> x >> y; // total # of lengs should be even if (y & 1) return "NO"; int b = y / 2 - x; int a = x - b; if (a < 0 || b < 0) return "NO"; return (a + b == x) ? "YES" :...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; string solve() { int x, y; cin >> x >> y; // total # of lengs should be even if (y & 1) return "No"; int b = y / 2 - x; int a = x - b; if (a < 0 || b < 0) return "No"; return (a + b == x) ? "Yes" :...
[["-", 8, 9, 0, 57, 64, 37, 0, 5, 0, 6], ["+", 8, 9, 0, 57, 64, 37, 0, 5, 0, 6], ["-", 8, 9, 0, 37, 0, 41, 64, 5, 0, 6], ["+", 8, 9, 0, 37, 0, 41, 64, 5, 0, 6], ["-", 8, 9, 0, 37, 0, 41, 75, 5, 0, 6], ["+", 8, 9, 0, 37, 0, 41, 75, 5, 0, 6]]
1
123
x, y = map(int,input().split()) min = 2 * x gap = y - min if gap < 0 & gap > min: print("No") else: if gap % 2 == 0: print("Yes") else: print("No")
x, y = map(int,input().split()) min = 2 * x gap = y - min if gap < 0 or gap > min: print("No") else: if gap % 2 == 0: print("Yes") else: print("No")
[["-", 0, 656, 0, 57, 15, 666, 0, 657, 17, 67], ["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 354]]
5
64
X,Y=map(int,input().split()) a=[] for i in range(1,X+1): if i*2+(X-i)*4==Y: a.append('Yes') else: continue if 'Yes' in a: print('Yes') else: print('No')
X,Y=map(int,input().split()) a=[] for i in range(0,X+1): if i*2+(X-i)*4==Y: a.append('Yes') else: continue if 'Yes' in a: print('Yes') else: print('No')
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]]
5
79
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; for (int i = 0; i <= x; i++) { if (i * 2 + (x - 1) * 4 == y) { cout << "Yes" << endl; goto loopend; } } cout << "No" << endl; loopend: return 0; }
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; for (int i = 0; i <= x; i++) { if (i * 2 + (x - i) * 4 == y) { cout << "Yes" << endl; goto loopend; } } cout << "No" << endl; loopend: return 0; }
[["-", 31, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 12, 22]]
1
81
package main import ( "bufio" "fmt" "os" "strconv" ) func nextLine(r *bufio.Reader) string { var buf []byte for { line, isPrefix, err := r.ReadLine() if err != nil { panic(err) } buf = append(buf, line...) if !isPrefix { break } } return string(buf) } func nextStr(s *bufio.Scanner) string {...
package main import ( "bufio" "fmt" "os" "strconv" ) func nextLine(r *bufio.Reader) string { var buf []byte for { line, isPrefix, err := r.ReadLine() if err != nil { panic(err) } buf = append(buf, line...) if !isPrefix { break } } return string(buf) } func nextStr(s *bufio.Scanner) string {...
[["-", 8, 196, 0, 7, 0, 430, 15, 16, 17, 18], ["+", 8, 196, 0, 7, 0, 430, 15, 16, 17, 19]]
7
287
x,y = map(int,input().split()) l = [] c = 2 * x l.append(c) for nn in range(x): c += 2 l.append(c) print(l) flag = False for ll in l: if ll == y: print("Yes") flag = False break else: flag = True if flag: print("No")
x,y = map(int,input().split()) l = [] c = 2 * x l.append(c) for nn in range(x): c += 2 l.append(c) flag = False for ll in l: if ll == y: print("Yes") flag = False break else: flag = True if flag: print("No")
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
89
#include <bits/stdc++.h> using namespace std; // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/tree_policy.hpp> // using namespace __gnu_pbds; #define ordered_set \ tree<pair<int, int>, null_type, less<pair<int, int>>, rb_tree_tag, ...
#include <bits/stdc++.h> using namespace std; // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/tree_policy.hpp> // using namespace __gnu_pbds; #define ordered_set \ tree<pair<int, int>, null_type, less<pair<int, int>>, rb_tree_tag, ...
[["+", 51, 16, 31, 16, 12, 16, 31, 16, 17, 85], ["+", 51, 16, 31, 16, 12, 16, 31, 16, 12, 13], ["+", 51, 16, 12, 16, 31, 16, 12, 16, 17, 85], ["+", 51, 16, 12, 16, 31, 16, 12, 16, 12, 13]]
1
621
#include <stdio.h> int main(void) { int x, y; scanf("%d %d", &x, &y); if (y % 2 == 1) { printf("No\n"); } else if (2 * x - 1 < y && y < 4 * x) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
#include <stdio.h> int main(void) { int x, y; scanf("%d %d", &x, &y); if (y % 2 == 1) { printf("No\n"); } else if (2 * x <= y && y <= 4 * x) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
[["-", 15, 23, 0, 16, 31, 16, 31, 16, 17, 33], ["-", 15, 23, 0, 16, 31, 16, 31, 16, 12, 13], ["-", 0, 57, 15, 23, 0, 16, 31, 16, 17, 18], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 17, 19], ["-", 0, 57, 15, 23, 0, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 23, 0, 16, 12, 16, 17, 19]]
0
86
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] s = br.readLine().split(" "); int x = Integer.parseInt(s...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] s = br.readLine().split(" "); int x = Integer.parseInt(s...
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19]]
3
159
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll x, y; cin >> x >> y; if (y % 2 == 0 && 2 * x <= y && y <= 4 * y) cout << "Yes"; else cout << "No"; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll x, y; cin >> x >> y; if (y % 2 == 0 && 2 * x <= y && y <= 4 * x) cout << "Yes"; else cout << "No"; return 0; }
[["-", 15, 339, 51, 16, 12, 16, 12, 16, 12, 22], ["+", 15, 339, 51, 16, 12, 16, 12, 16, 12, 22]]
1
64
#include <algorithm> #include <cmath> #include <iostream> #include <string> #define ll long long using namespace std; int main() { int X, Y; cin >> X >> Y; if (Y % 2 != 0) { cout << "No" << endl; return 0; } bool can = false; int kame, reg; for (int turu = 1; turu <= X; turu++) { kame = X ...
#include <algorithm> #include <cmath> #include <iostream> #include <string> #define ll long long using namespace std; int main() { int X, Y; cin >> X >> Y; if (Y % 2 != 0) { cout << "No" << endl; return 0; } bool can = false; int kame, reg; for (int turu = 0; turu <= X; turu++) { kame = X ...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
129
X, Y = map(int, input().split()) if Y%2==1 or 4*X<Y: print("No") else: print("Yes")
X, Y = map(int, input().split()) if Y%2==1 or 4*X<Y or 2*X>Y: print("No") else: print("Yes")
[["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 354], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 31, 612], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 17, 48], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 12, 22], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 47], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 22]]
5
43
/* */ #include <algorithm> #include <cstdlib> #include <iomanip> #include <ios> #include <iostream> #include <map> #include <math.h> #include <queue> #include <stack> #include <string> #include <utility> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) #define repb(i, a, b) for (int i = a; i < b; i++) #...
/* */ #include <algorithm> #include <cstdlib> #include <iomanip> #include <ios> #include <iostream> #include <map> #include <math.h> #include <queue> #include <stack> #include <string> #include <utility> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) #define repb(i, a, b) for (int i = a; i < b; i++) #...
[["+", 15, 339, 51, 16, 12, 16, 31, 16, 17, 85], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 12, 13]]
1
139
a,b=[int(x) for x in input().split(" ")] x=(b-2*a)/2 y=(4*a-b)/2 print("Yes" if x>0 and y>0 and x%1==0.0 and y%1==0.0 else "No")
a,b=[int(x) for x in input().split(" ")] x=(b-2*a)/2 y=(4*a-b)/2 print("Yes" if x>=0 and y>=0 and x%1==0.0 and y%1==0.0 else "No")
[["-", 0, 679, 31, 679, 31, 679, 31, 666, 667, 47], ["+", 0, 679, 31, 679, 31, 679, 31, 666, 667, 20], ["-", 0, 679, 31, 679, 31, 679, 12, 666, 667, 47], ["+", 0, 679, 31, 679, 31, 679, 12, 666, 667, 20]]
5
75
#include <cstdio> int main() { int x, y; bool flag = false; scanf("%d%d", &x, &y); for (int i = 0; i < x; i++) { if ((i * 4 + (x - i) * 2) == y) flag = true; } flag ? puts("Yes") : puts("No"); return 0; }
#include <cstdio> int main() { int x, y; bool flag = false; scanf("%d%d", &x, &y); for (int i = 0; i <= x; i++) { if ((i * 4 + (x - i) * 2) == y) flag = true; } flag ? puts("Yes") : puts("No"); return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
88
X, Y= map(int,input().split()) a=2*X b=(Y-a)/2 c=X-b if(2*c+4*b==Y and (Y-a)%2==0 and c>=0): print("Yes") else: print("No")
X, Y= map(int,input().split()) a=2*X b=(Y-a)/2 c=X-b if(2*c+4*b==Y and (Y-a)%2==0 and c>=0 and b>=0): print("Yes") else: print("No")
[["+", 0, 656, 0, 57, 15, 23, 0, 679, 17, 355], ["+", 0, 57, 15, 23, 0, 679, 12, 666, 0, 22], ["+", 0, 57, 15, 23, 0, 679, 12, 666, 667, 20], ["+", 0, 57, 15, 23, 0, 679, 12, 666, 0, 612]]
5
76
x, y= map(int, input().split()) for i in range(x): if 2*i+4*(x-i)==y: print("Yes") exit(0) print("No")
x, y= map(int, input().split()) for i in range(x+1): if 2*i+4*(x-i)==y: print("Yes") exit(0) print("No")
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
55
#include <stdio.h> int main() { int x, n; scanf("%d %d", &x, &n); if (n % 2 == 0) { if (n > (x * 2) && n < (x * 4)) printf("Yes"); else printf("No"); } else { printf("No"); } return 0; }
#include <stdio.h> int main() { int x, n; scanf("%d %d", &x, &n); if (n % 2 == 0) { if (n >= (x * 2) && n <= (x * 4)) printf("Yes"); else printf("No"); } else { printf("No"); } return 0; }
[["-", 0, 57, 15, 23, 0, 16, 31, 16, 17, 47], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 17, 20], ["-", 0, 57, 15, 23, 0, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 23, 0, 16, 12, 16, 17, 19]]
0
82
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; if (y >= (x * 2) && y <= (x * 4) && y % 2 == 0) cout << "yes"; else cout << "no"; return 0; }
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; if (y >= (x * 2) && y <= (x * 4) && y % 2 == 0) cout << "Yes"; else cout << "No"; return 0; }
[["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
63
/*=============================================================================================================================/* Bismillahir Rahmanir Rahim _ ____ ___ ____ _ _ _ ___ ____ _ _ __ __ / \ / ___||_ _|| __ ) | | |...
/*=============================================================================================================================/* Bismillahir Rahmanir Rahim _ ____ ___ ____ _ _ _ ___ ____ _ _ __ __ / \ / ___||_ _|| __ ) | | |...
[["+", 15, 339, 51, 16, 31, 16, 31, 16, 31, 13], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 48], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106]]
1
301
#include <iostream> using namespace std; int main(void) { // Your code here! int x, y; cin >> x >> y; if (y % 3 == 0) { cout << "No" << endl; } else if (x * 2 <= y && x * 4 >= y) { cout << "Yes" << endl; } else cout << "No" << endl; }
#include <iostream> using namespace std; int main(void) { // Your code here! int x, y; cin >> x >> y; if (y % 2 == 1) { cout << "No" << endl; } else if (x * 2 <= y && x * 4 >= y) { cout << "Yes" << endl; } else cout << "No" << endl; }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
77
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; #define rep(i, n) for (int i = 0; i < (n); i++) typedef pair<int, int> P; const long double EPS = 1e-10; const long long INF = 1e18; const int MOD = (int)1e9 + 7; const long double PI = acos(-1.0...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; #define rep(i, n) for (int i = 0; i < (n); i++) typedef pair<int, int> P; const long double EPS = 1e-10; const long long INF = 1e18; const int MOD = (int)1e9 + 7; const long double PI = acos(-1.0...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
160
#include <bits/stdc++.h> using namespace std; int main() { long long t, n, i, ans, cnt, j, k; cin >> i >> j; if (j % 2 != 0) cout << "No"; else { if (j > 4 * i && j < 2 * i) cout << "No"; else cout << "Yes"; } }
#include <bits/stdc++.h> using namespace std; int main() { long long t, n, i, ans, cnt, j, k; cin >> i >> j; if (j % 2 != 0) cout << "No"; else { if (j > 4 * i || j < 2 * i) cout << "No"; else cout << "Yes"; } }
[["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 106]]
1
78
#include <bits/stdc++.h> #define rep(i, n) for (int(i) = 0; (i) < (int)(n); (i)++) #define REP(i, n) for (int(i) = 0; (i) <= (int)(n); (i)++) #define rep1(i, x, n) for (int(i) = (x); (i) < (int)(n); (i)++) #define REP1(i, x, n) for (int(i) = (x); (i) <= (int)(n); (i)++) #define rrep(i, x) for (int i = ((int)(x)-1); i >...
#include <bits/stdc++.h> #define rep(i, n) for (int(i) = 0; (i) < (int)(n); (i)++) #define REP(i, n) for (int(i) = 0; (i) <= (int)(n); (i)++) #define rep1(i, x, n) for (int(i) = (x); (i) < (int)(n); (i)++) #define REP1(i, x, n) for (int(i) = (x); (i) <= (int)(n); (i)++) #define rrep(i, x) for (int i = ((int)(x)-1); i >...
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]]
1
227
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; string ans = "No"; cin >> X >> Y; for (int i = 1; i < X + 1; i++) { if (Y == 4 * (X - i) + 2 * i) { ans = "Yes"; break; } } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; string ans = "No"; cin >> X >> Y; for (int i = 0; i < X + 1; i++) { if (Y == 4 * (X - i) + 2 * i) { ans = "Yes"; break; } } cout << ans << endl; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
80
x, y = map(int, input().split()) # kame = x - turu # 2*turu + 4*kame = y # 2*turu + 4*(x - turu) = y # -2*turu + 4x - y = 0 # turu = 2x - 1/2*y turu = 2*x - 1/2*y if(turu.is_integer and turu >= 0 and (x-turu) >= 0): print("Yes") else: print("No")
x, y = map(int, input().split()) # kame = x - turu # 2*turu + 4*kame = y # 2*turu + 4*(x - turu) = y # -2*turu + 4x - y = 0 # turu = 2x - 1/2*y turu = 2*x - 1/2*y if(turu.is_integer() and turu >= 0 and (x-turu) >= 0): print("Yes") else: print("No")
[["+", 0, 679, 31, 679, 31, 652, 3, 4, 0, 24], ["+", 0, 679, 31, 679, 31, 652, 3, 4, 0, 25]]
5
65
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; cin >> X >> Y; double a, b; a = (4 * X - Y) / 2; b = (Y - 2 * X) / 2; if (ceil(a) == floor(a) && ceil(b) == floor(b) && a >= 0 && b >= 0) { cout << "Yes" << endl; // cout << "tsuru" << a << endl; // cout << "kame" << b << ...
#include <bits/stdc++.h> using namespace std; int main() { float X, Y; cin >> X >> Y; float a, b; a = (4 * X - Y) / 2; b = (Y - 2 * X) / 2; if (ceil(a) == floor(a) && ceil(b) == floor(b) && a >= 0 && b >= 0) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
105
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; cin >> X >> Y; int tsuru, kame; int flag = 0, sum; for (int i = 1; i <= X; i++) { tsuru = i; kame = X - i; sum = tsuru * 2 + kame * 4; if (sum == Y) flag = 1; } if (flag == 0) cout << "No" << endl; else ...
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; cin >> X >> Y; int tsuru, kame; int flag = 0, sum; for (int i = 0; i <= X; i++) { tsuru = i; kame = X - i; sum = tsuru * 2 + kame * 4; if (sum == Y) flag = 1; } if (flag == 0) cout << "No" << endl; else ...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
104
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; typedef long long ll; int main() { ll x, y; ll a; ll flag = 0; cin >> x >> y; rep(i, x) { a = x - i; if ((2 * a + 4 * i) == 0) flag = 1; } if (flag == 0) cout << "No" << endl; if (flag...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; typedef long long ll; int main() { ll x, y; ll a; ll flag = 0; cin >> x >> y; rep(i, x + 1) { a = x - i; if ((2 * a + 4 * i) == y) flag = 1; } if (flag == 0) cout << "No" << endl; if (...
[["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 12, 22]]
1
107
#include <stdio.h> int main() { int a, b; scanf("%d %d", &a, &b); if (b % 2 == 0) { if (b >= a * 2 && b <= a * 4) { printf("Yes\n"); } else { printf("No\n"); } } return 0; }
#include <stdio.h> int main() { int a, b; scanf("%d %d", &a, &b); if (b % 2 == 0 && b >= a * 2 && b <= a * 4) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
[["-", 0, 14, 8, 9, 0, 57, 15, 23, 0, 25], ["-", 0, 14, 8, 9, 0, 57, 64, 9, 0, 45], ["-", 8, 9, 0, 57, 64, 9, 0, 57, 0, 121], ["-", 0, 57, 64, 9, 0, 57, 15, 23, 0, 24], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 17, 98], ["-", 64, 9, 0, 57, 75, 76, 0, 9, 0, 46]]
0
74
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int x, y; cin >> x >> y; bool a = false; for (int i = 0; i < x; i++) { if (i * 2 + (x - i) * 4 == y) { a = true; } } if (a) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int x, y; cin >> x >> y; bool a = false; for (int i = 0; i <= x; i++) { if (i * 2 + (x - i) * 4 == y) { a = true; } } if (a) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
95
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); if (x * 2 >= y && x * 4 <= y) { if (y % 2 == 0) { System.out.println("Yes"); return; } } System.out.println(...
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); if (x * 2 <= y && x * 4 >= y) { if (y % 2 == 0) { System.out.println("Yes"); return; } } System.out.println(...
[["-", 0, 57, 15, 15, 0, 16, 31, 16, 17, 20], ["+", 0, 57, 15, 15, 0, 16, 31, 16, 17, 19], ["-", 0, 57, 15, 15, 0, 16, 12, 16, 17, 19], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 17, 20]]
3
102
#include <bits/stdc++.h> using namespace std; #define all(x) x.begin(), x.end() #define sz(x) (int)x.size() #define pb push_back #define endl '\n' #define snd second #define fst first #define fastio cin.tie(NULL), cout.sync_with_stdio(true) typedef long long int ll; typedef unsigned long long int ull; typedef vector...
#include <bits/stdc++.h> using namespace std; #define all(x) x.begin(), x.end() #define sz(x) (int)x.size() #define pb push_back #define endl '\n' #define snd second #define fst first #define fastio cin.tie(NULL), cout.sync_with_stdio(true) typedef long long int ll; typedef unsigned long long int ull; typedef vector...
[["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 354], ["+", 15, 339, 51, 16, 12, 16, 31, 23, 0, 24], ["+", 15, 339, 51, 16, 12, 16, 31, 23, 0, 25]]
1
204
tmp = input().split(" ") total = int(tmp[0]) leg = int(tmp[1]) if leg % 2 == 0 and 4 * total > leg > 2 * total: print("Yes") else: print("No")
tmp = input().split(" ") total = int(tmp[0]) leg = int(tmp[1]) if leg % 2 == 0 and 4 * total >= leg >= 2 * total: print("Yes") else: print("No")
[["-", 0, 656, 0, 57, 15, 679, 12, 666, 667, 47], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 20]]
5
61
import sys x,y = map(int,input().split()) for n in range(x+1): kame = x - n tsuru_leg = n*2 kame_leg = kame*4 if y == tsuru_leg + kame_leg: print('yes') sys.exit() print('no')
import sys x,y = map(int,input().split()) for n in range(x+1): kame = x - n tsuru_leg = n*2 kame_leg = kame*4 if y == tsuru_leg + kame_leg: print('Yes') sys.exit() print('No')
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
67
a,b=map(int,input().split()) c=0 for i in range (1,a+1): for j in range (1,a+1-i): if (i+j)==a and (i*2 + j *4) == b: c+=1 if c== 0: print('No') else: print('Yes')
a,b=map(int,input().split()) c=0 for i in range (0,a+1): for j in range (0,a+1): if (i+j)==a and (i*2 + j *4) == b: c+=1 if c== 0: print('No') else: print('Yes')
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 22]]
5
88
#include <stdio.h> int x, y, c, t; int main() { scanf("%d%d", &x, &y); for (t = 0; t <= x; t++) { c = x - t; if (4 * t + 2 * c == y) printf("Yes\n"); return 0; } printf("No\n"); return 0; }
#include <stdio.h> int x, y, c, t; int main() { scanf("%d%d", &x, &y); for (t = 0; t <= x; t++) { c = x - t; if (4 * t + 2 * c == y) { printf("Yes\n"); return 0; } } printf("No\n"); return 0; }
[["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]]
0
85
x, y = map(int, input().split()) check = y % 2 == 0 and y <= 4 * x print("Yes" if check else "No")
x, y = map(int, input().split()) check = y % 2 == 0 and 2 * x <= y <= 4*x print("Yes" if check else "No")
[["+", 0, 662, 12, 679, 12, 666, 0, 657, 31, 612], ["+", 0, 662, 12, 679, 12, 666, 0, 657, 17, 48], ["+", 0, 662, 12, 679, 12, 666, 0, 657, 12, 22], ["+", 0, 1, 0, 662, 12, 679, 12, 666, 667, 19]]
5
41
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll mod = 1000000007; #define pll pair<ll, ll> #define pii pair<int32_t, int32_t> #define loop(i, n) for (int64_t i = 0; i < n; i++) #define loop1(i, a, b) for (int64_t i = a; i <= b; i++) #define rloop(i, n) for (int64_t i = n - 1; i >= 0; i--) #define...
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll mod = 1000000007; #define pll pair<ll, ll> #define pii pair<int32_t, int32_t> #define loop(i, n) for (int64_t i = 0; i < n; i++) #define loop1(i, a, b) for (int64_t i = a; i <= b; i++) #define rloop(i, n) for (int64_t i = n - 1; i >= 0; i--) #define...
[["-", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6], ["+", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6], ["-", 64, 9, 0, 1, 0, 11, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 11, 12, 5, 0, 6]]
1
197