/*************************************************************************
	> File Name: 1.cpp
	> Author: Knowledge_llz
	> Mail: 925538513@qq.com 
	> Blog: https://www.cnblogs.com/Knowledge-Pig/ 
	> Created Time: 2021/2/9 10:34:35
 ************************************************************************/

#include<bits/stdc++.h>
#define For(i,a,b) for(int i=(a);i<=(b);++i)
#define LL long long
#define pb push_back
#define fi first
#define se second
#define pr pair<int,int>
#define mk(a,b) make_pair(a,b)
using namespace std;
int read(){
	char x=getchar(); int u=0,fg=0;
	while(!isdigit(x)){ if(x=='-') fg=1; x=getchar(); }
	while(isdigit(x)){ u=(u<<3)+(u<<1)+(x^48); x=getchar(); }
	return fg?-u:u;
}
int l,r,x,st=2,cnt=1,sum,e=0;
pr a[100];
struct node{
	int s,t,c;	
}path[100*100];
bool p[100];
int main()
{
#ifndef ONLINE_JUDGE
	freopen("input.in", "r", stdin);
	freopen("output.out", "w", stdout);
#endif
	l=read(); r=read();
	printf("YES\n");
	if(r==1){
		printf("2 1\n1 2 1\n");
		return 0;
	}
	if(l==1) l=2,st=1;
	a[cnt]=mk(0,0);
	a[++cnt]=mk(l-1,l-1);
	path[++e]=(node){cnt-1,cnt,l-1};
	x=l-1; sum=2;
	while(a[cnt].se<r-1){
		++cnt;
		a[cnt].fi=x+1;
		if(x+sum>=r-1){
			int d=r-x-1;
			for(int j=cnt-1;j;--j){
				int y=a[j].se-a[j].fi+1;
				if(d>=y){ d-=y; p[j]=1; }
			}
			For(i,1,cnt-1){
				if(!p[i]) continue;
				path[++e]=(node){i,cnt,x+1-a[i].fi};
				x=a[i].se+x+1-a[i].fi;
			}
			a[cnt].se=x;
			break;
		}
		For(i,1,cnt-1){
			path[++e]=(node){i,cnt,x+1-a[i].fi};
			x=a[i].se+x+1-a[i].fi;
		}
		a[cnt].se=x;
		sum+=(a[cnt].se-a[cnt].fi+1);
	}
//	For(i,1,cnt){
//		printf("%d %d %d\n",a[i].fi,a[i].se,a[i].se-a[i].fi+1);
//	}
	++cnt;
	For(i,st,cnt-1) path[++e]=(node){i,cnt,1};
	printf("%d %d\n",cnt,e);
	For(i,1,e) printf("%d %d %d\n",path[i].s,path[i].t,path[i].c);
	return 0;
}
