#include <algorithm>
#include <cmath>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>

using namespace std;
using ll = long long;

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    ll A, B;
    cin >> A >> B;

    deque<pair<ll, ll>> q;

    q.push_back(make_pair(A, B));
    while (!q.empty()) {
        auto p = q.front();
        q.pop_front();
        if (p.first == 0 || p.second == 0) {
            cout << "Yes" << endl;
            return 0;
        }

        if (p.first % 2 == 0 && p.second % 2 == 0) {
            q.push_back(make_pair(p.first / 2, p.second - 1));
            q.push_back(make_pair(p.first - 1, p.second / 2));
        } else if (p.first % 2 == 0) {
            q.push_back(make_pair(p.first / 2, p.second - 1));
        } else if (p.second % 2 == 0) {
            q.push_back(make_pair(p.first - 1, p.second / 2));
        }
    }

    cout << "No" << endl;

    return 0;
}