temp2

//https://drive.google.com/drive/folders/1jpkE2jz0UaxAVG3gE6Itk6LbKEqWLDW5

#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;
#define ordered_set tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update>
//order_of_key (k) : Number of items strictly smaller than k .
//find_by_order(k) : K-th element in a set (counting from zero).(returns to an iterator)

#define ll long long int
#define llu unsigned long long int
#define pi 3.14159265359
#define lcm(x, y) (x / gcd(x, y)) * y
#define sin(x) sin((x / 180.0) * pi)
#define cos(x) cos((x / 180.0) * pi)
#define tan(x) tan((x / 180.0) * pi)
#define len(x1, y1, x2, y2) hypot(x1 - x2, y1 - y2)
#define sorta(v) sort(v.begin(), v.end())
#define sortd(v) sort(v.begin(), v.end(), greater<>())
#define min_el(v) (*min_element((v).begin(), (v).end()))
#define max_el(v) (*max_element((v).begin(), (v).end()))
#define sum(v) (accumulate((v).begin(), (v).end(), 0ll))
#define uniq(v) v.erase(unique(v.begin(), v.end()), v.end());
#define min_eli(v) (min_element((v).begin(), (v).end()) - (v).begin())
#define max_eli(v) (max_element((v).begin(), (v).end()) - (v).begin())
#define lowb(v, e) (lower_bound((v).begin(), (v).end(), (e)) - (v).begin())
#define upb(v, e) (upper_bound((v).begin(), (v).end(), (e)) - (v).begin())

vector<vector<int>> subSet(vector<int> vc) {
    int n = vc.size();
    int subsetSize = (1 << n);  // 2^n
    vector<vector<int>> subsets;
    for (int i = 0; i < subsetSize; i++) {
        vector<int> subset;
        for (int j = 0; j < n; j++) {
            if ((i & (1 << j)) != 0) {
                subset.push_back(vc[j]);
            }
        }
        subsets.push_back(subset);
    }
    return subsets;
}
//priority_queue<int> pq//maxheap;
//priority_queue<int, vector<int>, greater<int> > pq;//minheap

// Function to convert binary to decimal
// Time complexity : O( logn)
// int binaryToDecimal(int n) {
//     int num = n;
//     int dec_value = 0;
//     // Initializing base value to 1, i.e 2^0
//     int base = 1;
//     int temp = num;
//     while (temp) {
//         int last_digit = temp % 10;
//         temp = temp / 10;
//         dec_value += last_digit * base;
//         base = base * 2;
//     }
//     return dec_value;
// }

// Function to convert binary to decimal
// Time complexity : O(n)
// int binaryToDecimal(string n) {
//     string num = n;
//     int dec_value = 0;
//     // Initializing base value to 1, i.e 2^0
//     int base = 1;
//     int len = num.length();
//     for (int i = len - 1; i >= 0; i--) {
//         if (num[i] == '1')
//             dec_value += base;
//         base = base * 2;
//     }
//     return dec_value;
// }

/*#define MAXN 100001
int spf[MAXN];
void sieve(){
        spf[1] = 1;
        for (int i=2; i<MAXN; i++)
                spf[i] = i;
        for (int i=4; i<MAXN; i+=2)
                spf[i] = 2;
        for (int i=3; i*i<MAXN; i++){
                if (spf[i] == i){
                        for (int j=i*i; j<MAXN; j+=i)
                                if (spf[j]==j)spf[j] = i;
                }
        }
}
vector<int> getF(int x){
        vector<int> vc;
        while (x != 1){
                vc.push_back(spf[x]);
                x = x / spf[x];
        }
        return vc;
}*/

// int mark[10000001], cnt = 0;
// long long int primeList[1000000];
// void sieve() {
//     int n = 10000000;
//     mark[1] = 1;
//     for (int i = 4; i <= n; i += 2) mark[i] = 1;
//     primeList[cnt] = 2, cnt++;
//     for (int i = 3; i <= n; i += 2) {
//         if (mark[i] == 0) {
//             primeList[cnt] = i, cnt++;
//             if (i <= sqrt(n)) {
//                 for (int j = i * 2; j <= n; j += i) mark[j] = 1;
//             }
//         }
//     }
// }

// LowerBound
//  ll l = -1, r = n;
//  while (l + 1 < r) {
//      ll mid = (l + r) / 2;
//      if (arr[mid] >= q) {
//          r = mid;
//      } else {
//          l = mid;
//      }
//  }
//  cout << r + 1 << endl;
//  ll LowerBound = lower_bound(arr, arr+n, q)-arr;
//  cout<<LowerBound<<endl;

// UpperBound
// ll l = -1, r = n;
// while (l + 1 < r) {
//     ll mid = (l + r) / 2;
//     if (arr[mid] > q) {
//         r = mid;
//     } else {
//         l = mid;
//     }
// }
// cout << r << endl;
// ll UpperBound = upper_bound(arr, arr+n, q)-arr;
// cout<<UpperBound<<endl;

void solve() {
    int x, y;
    cin >> x >> y;
    if ((x * 2) <= y && y <= (x * 4) && y % 2 == 0)
        cout << "Yes" << endl;
    else
        cout << "No" << endl;
}
void T() {
    ll t;
    cin >> t;
    while (t--) {
        solve();
    }
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    // T();
    solve();
    return 0;
}

Comments

Popular posts from this blog

Privacy Policy

Algo2

Privacy Policy for Oshud Sheba