#include<bits/stdc++.h>
using namespace std;
struct str{
	int u,v,w;
};
vector<str> g;
int i,j,l,r;
int main()
{
	scanf("%d %d",&l,&r);
	for(i=2;i<22;++i)
	{
		for(j=i+1;j<22;++j)
			g.push_back({i,j,1<<21-j});
		g.push_back({i,22,1});
	}
	r=r-l+1;
	for(i=2;i<=21;++i)
	{
		if(r>(1<<21-i))
		{
			g.push_back({1,i,r-(1<<21-i)+l-1});
			r-=(1<<21-i);
		}
		else
			if(r==(1<<21-i))
			{
				//cout<<i<<endl;
				for(j=i+1;j<=21;++j)
					g.push_back({1,j,l-1+(1<<21-j)});
				g.push_back({1,22,l});
				break;
			}
	}
	puts("YES");
	cout<<22<<' '<<g.size()<<endl;
	for(auto it:g)
		cout<<it.u<<' '<<it.v<<' '<<it.w<<endl;
}
