#include <bits/stdc++.h>
#define forr(i,a,b) for(int i=(a);i<(b);i++)
#define forn(i,n) forr(i,0,n)
#define dforn(i,n) for(int i=n-1;i>=0;i--)
#define forall(it,v) for(auto it=v.begin();it!=v.end();it++)
#define sz(c) ((int)c.size())
#define rsz resize
#define pb push_back
#define mp make_pair
#define lb lower_bound
#define ub upper_bound
#define fst first
#define snd second

#ifdef ANARAP
#else
#endif

using namespace std;

typedef long long ll;
typedef pair<int,int> ii;
typedef pair<ii,int> iii;

int main()
{
	#ifdef ANARAP
		freopen("input.in", "r", stdin);
		//freopen("output.out", "w", stdout);
	#endif
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	int l,r;
	cin >> l >> r;
	cout << "YES\n";
	int n = 32, nxt = l+1, maxcur = 1;
	vector<iii> ans;
	ans.pb(mp(mp(1,32), l));
	dforn(x,30)
	{
		if(nxt > r) break;
		int node = x+2;
		int pathsLeft = r-nxt+1;
		assert(pathsLeft > 0);
		ans.pb(mp(mp(1, node), l));
		if(pathsLeft >= maxcur)
		{
			forr(i,node+1, 33) ans.pb(mp(mp(node, i), maxcur));
			nxt += maxcur;
			maxcur *= 2;
		}
		else
		{
			int curr = r;
			dforn(i,20) if(pathsLeft & (1<<i))
			{
				int auxw = curr-l-((1<<(i+1))-1);
				int nxtnode = 31-i;
				ans.pb(mp(mp(node, nxtnode), auxw));
				curr -= 1<<i;
			}
			break;
		}
	}
	cout << n << ' ' << sz(ans) << '\n';
	forall(it,ans) cout << it->fst.fst << ' ' << it->fst.snd << ' ' << it->snd << '\n';
	return 0;
}
