#include<bits/stdc++.h>
#define int long long
#define p pair<int, int>
//#define endl '\n'
const int INF = 1000000001;

using namespace std;

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int l1, r1;
    cin >> l1 >> r1;
    cout << "YES" << endl;
    int x = r1-l1, m = 0, n = 22;
    vector<vector<p>> d(n);
    for (int q = 1; q < n-1; q++){
        int deg = 1;
        d[0].push_back({q, 1});
        m++;
        for (int q1 = 1; q1 < q; q1++){
            d[q1].push_back({q, deg});
            deg *= 2, m++;
        }
    }
    d[0].push_back({n-1, 1});
    m++;
    int sum1 = 0;
    for (int q = 0; q < 20; q++){
        if ((x >> q) & 1){
            d[q+1].push_back({n-1, sum1+1});
            m++, sum1 += (1 << q);
        }
    }
    cout << n << ' ' << m << endl;
    for (int q = 0; q < n; q++){
        for (p q1: d[q]){
            cout << q+1 << ' ' << q1.first+1 << ' ' << q1.second+(q == 0)*(l1-1) << endl;
        }
    }
    return 0;
}
