#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
typedef long double ld;
//typedef tree<int,null_type,less<int >,rb_tree_tag,tree_order_statistics_node_update>indexed_set;
template<class T1, class T2>
ostream &operator <<(ostream &os, pair<T1,T2>&p);
template <class T>
ostream &operator <<(ostream &os, vector<T>&v);
template <class T>
ostream &operator <<(ostream &os, set<T>&v);
template <class T1, class T2>
ostream &operator <<(ostream &os, map<T1,T2>&v);
#ifdef APURBA
#define HERE cout<<"here - "<<__LINE__<<"\n";
#define debug(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
void err(istream_iterator<string> it)
{
    cout<<endl;
}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args)
{
    cout << *it << " = " << a << " ";
    err(++it, args...);
}
#else
#define HERE
#define debug(args...)
#endif
const int N = 5e5 +5;
const ll mod = 1e9+7;
typedef pair<int,int> pii;

struct edge{
    int u, v , w;
};

void TEST_CASES(int cas)
{
    int l,r;
    cin>>l>>r;
    cout<<"YES\n";
    if(l==r)
    {
        cout<<"2 1\n1 2 "<<l<<"\n";
        return;
    }
    int val =r -l;
    vector<int>kon;
    for(int i=0;i<30;i++)
    {
        if(val&(1<<i))
        {
            kon.push_back(i);
        }
    }
    int n = kon.back() + 3;
    int high = kon.back();

    vector<edge>ans;
    ans.push_back({1,n,l});
    for(int i= high-1;i>=0;i--)
    {
        int val = (1<<i);
        for(int j=high+2-i+1;j<=n-1;j++)
        {
            ans.push_back({high+2-i,j,val});
        }
        ans.push_back({1,high+2-i,l});
        ans.push_back({high+2-i, n ,val});
    }
    val -= (1<<high);
    ans.push_back({1,2,l});
    ans.push_back({high+2-high , n , (1<<high)});
    debug(val);
    int xd = (1<<high);
    for(int i=0;i<high;i++)
    {
        if(val&(1<<i))
        {
            ans.push_back({2 , high+2-i , xd});
        }
        else{
            xd -= (1<<i);
        }
    }
    cout<<n<<" "<<ans.size()<<"\n";
    for(auto it:ans)
    {
        cout<<it.u<<" "<<it.v<<" "<<it.w<<"\n";
    }


}




/*

*/

int32_t main()
{
#ifndef APURBA
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
#endif
    //freopen("input.txt","r",stdin);
    //freopen("out1.txt","w",stdout);
    int t=1,cas=0;
    //cin>>t;
    while(t--)
    {
        TEST_CASES(++cas);
    }
    return 0;
}



template<class T1, class T2>
ostream &operator <<(ostream &os, pair<T1,T2>&p)
{
    os<<"{"<<p.first<<", "<<p.second<<"} ";
    return os;
}
template <class T>
ostream &operator <<(ostream &os, vector<T>&v)
{
    os<<"[ ";
    for(int i=0; i<v.size(); i++)
    {
        os<<v[i]<<" " ;
    }
    os<<" ]";
    return os;
}

template <class T>
ostream &operator <<(ostream &os, set<T>&v)
{
    os<<"[ ";
    for(T i:v)
    {
        os<<i<<" ";
    }
    os<<" ]";
    return os;
}
template <class T1, class T2>
ostream &operator <<(ostream &os, map<T1,T2>&v)
{
    for(auto i:v)
    {
        os<<"Key : "<<i.first<<" , Value : "<<i.second<<endl;
    }
    return os;
}


