#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#define endl '\n'

using namespace std;

int l, r;
void read()
{
	cin >> l >> r; 
}

struct edge
{
	int a, b, c; 
	edge() {}
	edge(int _a, int _b, int _c)
	{
		a = _a;
		b = _b;
		c = _c; 
	}
};

vector <edge> edges;
void solve()
{
	cout << "YES" << endl; 
	if (l == r)
	{
		cout << 2 << " " << 1 << endl;
		cout << 1 << " " << 2 << " " << l << endl;
		
		return;  
	}
	
	int r1 = r - l + 1; 
	int idx = 2; 
	while ((1 << (idx - 2)) <= r1)
	{
		edges.push_back(edge(1, idx, 1));
		for (int i = 2; i < idx; i++)
		edges.push_back(edge(i, idx, 1 << (i-2)));
		
		idx++;
	}
	
	idx--; 
	int curr_r = (1 << (idx - 2));
	if (curr_r == r1)
	{
		if (l != 1)
		{
			edges.push_back(edge(idx, idx + 1, l-1));
	        cout << idx + 1 << " " << (int)edges.size() << endl;
	        for (auto i: edges)
	        cout << i.a << " " << i.b << " " << i.c << endl; 
		}
		
		else 
		{
			cout << idx << " " << (int)edges.size() << endl;
			for (auto i: edges)
	        cout << i.a << " " << i.b << " " << i.c << endl;
		}
	    
	    return;
	}
	
	edges.push_back(edge(idx, idx + 1, 1));
	edges.push_back(edge(1, idx + 1, 1));
	curr_r++;
	while (curr_r < r1)
	{
		int deg = 0;
		while (curr_r + (1 << deg) <= r1)
		deg++;
		
		deg--; 
		
		edges.push_back(edge(deg + 2, idx + 1, curr_r));
		curr_r += (1 << deg); 
	}
	
	if (l == 1)
	{
		cout << idx + 1 << " " << (int)edges.size() << endl;
		for (auto i: edges)
		cout << i.a << " " << i.b << " " << i.c << endl; 
		
		return;
	}
	
	edges.push_back(edge(idx+1, idx+2, l-1));
	
	cout << idx + 2 << " " << (int)edges.size() << endl;
	for (auto i: edges)
	cout << i.a << " " << i.b << " " << i.c << endl; 
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);

	read();
	solve();
}
