#include<bits/stdc++.h>
using namespace std;
const int N = 32*32+20;
int L,R,maxx;
int cm[N],ans=0,cnt;
struct Edge{
	int x,y,z;
	Edge(){}
	Edge(int a,int b,int c)
	{
		x=a;y=b;z=c;
	}
}E[N];
void solve(int r)
{
	E[++ans]=Edge(1,++cnt,1);
	for(int i=3;i<=maxx+2;i++)
	{
		E[++ans]=Edge(1,++cnt,1);
		for(int j=2;j<=i-1;j++)
			E[++ans]=Edge(j,i,1<<(j-2));
	}
}
void solve1(int r)
{
	solve(1<<maxx);
	if((1<<maxx)==r)return;
	E[++ans]=Edge(1,++cnt,1);
	for(int i=1;i<=maxx+1;i++)
		if((r-1)&(1<<(i-1)))
			E[++ans]=Edge(i+1,cnt,1+((r-1)>>i<<i));
}
int main()
{
	scanf("%d%d",&L,&R);
	for(int i=0;i<=20;i++)if((1<<i)<=R-L+1)
		maxx = i;
	cnt = 1;
	if(L==1)solve1(R);
	else
	{
		solve1(R-L+1);
		E[++ans]=Edge(cnt,cnt+1,L-1);++cnt;
	}
	printf("YES\n%d %d\n",cnt,ans);
	for(int i=1;i<=ans;i++)
		printf("%d %d %d\n",E[i].x,E[i].y,E[i].z);
	return 0;
}
