#include <bits/stdc++.h>

using namespace std;
#define ll long long
int main()
{
    ll n,m;
    cin>>n>>m;
    if(n==3 && m%4==3)
    cout<<"YES\n"<<1<<" "<<2<<" "<<3<<" "<<1;
    else
    if(n==2)
    cout<<"YES\n"<<1<<" "<<2<<" "<<1;
    else
    cout<<"NO";
}
