#include<bits/stdc++.h>
using namespace std;
using ll = long long int;
using ld = long double;
#define pow(n,m) powl(n,m);
#define sqrt(n) sqrtl(n);
const ll MAX = 5000000000000000000;
const ll MOD = 1000000007;
//998244353;
void randinit(){srand((unsigned)time(NULL));}
int main(){
    ll A,B;
    cin >> A >> B;
    vector<ll> prime = {2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71};
    vector<vector<bool>> P(B - A + 1,vector<bool>(20,0));
    for(ll i = 0;i <= B - A;i++){
        ll p = A + i;
        for(ll j = 0;j < 20;j++){
            if(p % prime[j] == 0) P[i][j] = 1;
        }
    }
    vector<vector<ll>> DP(B - A + 2,vector<ll>(1LL << 20,0));
    DP[0][0] = 1;
    for(ll i = 0;i <= B - A;i++){
        ll p = 0;
        for(ll j = 0;j < 20;j++){
            if(P[i][j]) p = p | (1LL << j);
        }
        for(ll j = 0;j < (1LL << 20);j++){
            DP[i + 1][j] += DP[i][j];
            if((p & j) == 0){
                DP[i + 1][(p | j)] += DP[i][j];
            }
        }
    }
    ll ans = 0;
    for(ll i = 0;i < (1LL << 20);i++){
        ans += DP[B - A + 1][i];
    }
    cout << ans << endl;
}

#include "bits/stdc++.h"
using namespace std;
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    long long a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, m = 0, n = 0, p = 0, q = 0, mod = 1000000007, pi = 3.1415926535;
    string s1, s2;
    char moji;

    cin >> a;
    vector<long long> v(a);
    vector<vector<long long>> dou(200);
    for(int i=0;i<a;i++)
    {
        cin >> b;
        b%=200;
        v.at(i)=b;
    }
    for(int i=1;i<pow(2,min(8LL,a));i++)
    {
      m=0;
        vector<int> bit(8,false);
        for(int j=0;j<8;j++)
        {
            long long div=pow(2,j);
            bit.at(j)=(i/div)%2;
            if(bit.at(j))
            {
                m+=v.at(j);
            }
        }
        m%=200;
        if(dou.at(m).size())
        {
            cout << "YES" << endl;
            cout << dou.at(m).size() << ' ';
            for(auto x:dou.at(m))
            cout << x+1 << ' ';
            cout << endl;
            cout << count(bit.begin(),bit.end(),true) << ' ';
            for(int j=0;j<8;j++)
            {
                if(bit.at(j))
                {
                    cout << j+1 << ' ';
                }
            }
            cout << endl;
            return 0;
        }
        else
        {
            for(int j=0;j<8;j++)
            {
                if(bit.at(j))
                {
                    dou.at(m).push_back(j);
                }
            }
        }
    }
    cout << "NO" << endl;
    return 0;
}