#include<bits/stdc++.h>
#define llong long long
#define mkpr make_pair
#define x first
#define y second
#define iter iterator
#define riter reverse_iterator
#define y1 Lorem_ipsum_
#define tm dolor_sit_amet_
#define piii pair<pair<int,int>,int>
using namespace std;

inline int read()
{
	int x = 0,f = 1; char ch = getchar();
	for(;!isdigit(ch);ch=getchar()) {if(ch=='-') f = -1;}
	for(; isdigit(ch);ch=getchar()) {x = x*10+ch-48;}
	return x*f;
}

vector<piii> ae;
int n,L,R;

int main()
{
	L = read(),R = read(); n = R-L+1;
	int tot = 2,cur = 1; ae.push_back(mkpr(mkpr(1,2),1));
	while((cur<<1)<n)
	{
		tot++; cur<<=1;
		for(int i=1; i<tot; i++)
		{
			ae.push_back(mkpr(mkpr(i,tot),1<<max(i-2,0)));
		}
	}
	if(n>1)
	{
		tot++; cur++; ae.push_back(mkpr(mkpr(1,tot),1)); ae.push_back(mkpr(mkpr(tot-1,tot),1));
		for(int i=tot-1; i>=2; i--)
		{
			if(cur+(1<<i-2)<=n) {ae.push_back(mkpr(mkpr(i,tot),cur)); cur += (1<<i-2);}
//			printf("i=%d cur=%d\n",i,cur);
		}
	}
	if(L>1) {tot++; ae.push_back(mkpr(mkpr(tot-1,tot),L-1));}
	puts("YES");
	printf("%d %d\n",tot,ae.size());
	for(int i=0; i<ae.size(); i++) printf("%d %d %d\n",ae[i].x.x,ae[i].x.y,ae[i].y);
	return 0;
}