#include <bits/stdc++.h>
using namespace std;
const int M = 280;
int n, m, L, R;
int a[M], b[M], c[M];
inline void add(int x, int y, int z) { a[++m] = x, b[m] = y, c[m] = z; }
int main()
{
	puts("YES");
	scanf("%d%d", &L, &R);
	R -= (L-1), n = log2(R) + 2;
	for (int i = 2; i <= n; i++) {
		add(1, i, 1);
		for (int j = 2; j < i; j++) 
			add(j, i, 1 << (j - 2));
	}
	if ((1 << (n - 2)) != R) {
		add(1, n + 1, 1);
		for (int i = n, sum = 1; i >= 2; i--) 
			if ((R - 1) & (1 << (i - 2))) 
				add(i, n + 1, sum), sum += (1 << (i - 2));
		n++;
	}
	if (L != 1) add(n, n + 1, L-1), n++;
	printf("%d %d\n", n, m);
	for (int i = 1; i <= m; i++) printf("%d %d %d\n", a[i], b[i], c[i]);
	return 0;
}