#include <bits/stdc++.h>

using namespace std;

int main() {
    ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
    int L, R; cin >> L >> R;
    int N = 32;
    vector<vector<pair<int, int>>> g(N);
    int cur = 1;
    vector<int> max_len_to_n(N, 0), min_len_to_n(N, 0);
    int m = 1;
    g[0].emplace_back(N - 1, L);
    for (int i = N - 2; i >= 0 && L + cur <= R; i--) {
        g[0].emplace_back(i, L);
        m++;
        for (int j = i + 1; j <= N - 1 && L + cur <= R; j++) {
            if (L + cur - min_len_to_n[j] + max_len_to_n[j] > R) {
                continue;
            }
            g[i].emplace_back(j, cur - min_len_to_n[j]);
            // cur++;
            if (min_len_to_n[i] == 0) {
                min_len_to_n[i] = cur;
            }
            max_len_to_n[i] = max(max_len_to_n[i], cur - min_len_to_n[j] + max_len_to_n[j]);
            cur = max_len_to_n[i] + 1;
            m++;
        }
    }
    if (cur + L <= R) {
        cout << "NO";
        return 0;
    }
    cout << "YES\n" << N << ' ' << m << '\n';
    for (int i = 0; i < N; i++) {
        for (auto &p : g[i]) {
            cout << i + 1 << ' ' << p.first + 1 << ' ' << p.second << '\n';
        }
    }
    return 0;
}