#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;

const int MAXN = 40;

vector<int> x[MAXN];

struct Edge {
  int a, b, c;
};

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int l, r;
  cin >> l >> r;
  int base = l - 1;
  l -= base;
  r -= base;
  int n = 2;
  if (base > 0) ++n;
  vector<int> p;
  for (int i = 0; i < 30; ++i) {
    p.push_back(n);
    if ((1 << i) >= r) break;
    ++n;
  }
  vector<Edge> ans;
  for (int i = n - 1; i >= 1; --i) {
    int t = n - 1 - i;
    if ((1 << t) <= r) {
      int len = (1 << t) / 2;
      for (int j = i + 1; len > 0; ++j) {
        ans.push_back({i, j, len});
        len /= 2;
      }
      ans.push_back({i, n, 1});
      if ((1 << t) == r) break;
      continue;
    }
    int k = i + 1;
    for (int j = t - 1; j >= 0; --j) {
      if (r > (1 << j)) {
        ans.push_back({i, k, r - (1 << j)});
        r -= (1 << j);
      }
      ++k;
    }
    if (r == 1) ans.push_back({i, n, 1});
    break;
  }
  if (base > 0) ans.push_back({1, 2, base});
  cout << "YES" << endl;
  cout << n << " " << ans.size() << endl;
  for (auto& [a, b, c] : ans) {
    cout << a << " " << b << " " << c << endl;
  }
  return 0;
}