#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using pll = pair<ll, ll>;
using pii = pair<int, int>;
using vvi = vector<vector<int>>;

struct edge {
    int u, v, c;
};

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

    int l, r;
    cin >> l >> r;
    if (l == r) {
        cout << "YES\n2 1\n1 2 " << l << endl;
        return 0;
    }

    int n = 32;
    vector<edge> edges;
    edges.reserve(4000);
    vector<pair<int, int>> targets(1, {n - 1, 1});
    int i = n - 2;
    for (int pow = 1; pow <= 1000000; pow *= 2, --i) {
        for (auto t : targets) {
            edges.push_back({i, t.first, t.second});
        }
        targets.emplace_back(i, pow);
    }
    /*
    for (auto e : edges) {
        cerr << e.u << " -> " << e.v << ": " << e.c << endl;
    }
    cerr << i << endl;
    */

    if (l == 1) {
        edges.push_back({0, 31, 1});
        ++l;
    }

    int pow2 = 1048576;
    while (l <= r) {
        pow2 /= 2;
        ++i;
        if (r - l + 1 < pow2) {
            continue;
        }
        edges.push_back({0, i, l - 1});
        l += pow2;
    }
    cout << "YES\n32 " << edges.size() << '\n';
    for (const auto &e : edges) {
        cout << e.u + 1 << ' ' << e.v + 1 << ' ' << e.c << '\n';
    }
    return 0;
}
