#include <bits/stdc++.h>
#if __has_include(<atcoder/all>)
    #include <atcoder/all>
    using namespace atcoder;
#endif
using namespace std;
namespace defines{
    typedef long long ll;
    typedef pair<ll,ll> P;
    #define FOR(i,a,b) for(ll i = a ; i < b ; i++) // for i in range(a,b)
    #define REP(i,n) for(ll i = 0 ; i < n ; i++) // for i in range(b)
    #define FORD(i,a,b) for(ll i = a ; i > b ; i--) // for i in range(a,b,-1)
    #define ALL(x) x.begin(),x.end()
    template<class T> vector<T> make_vec(size_t a){return vector<T>(a);}
    template<class T, class... Ts> auto make_vec(size_t a, Ts... ts){ return vector<decltype(make_vec<T>(ts...))>(a, make_vec<T>(ts...));}
    template<typename A, size_t N, typename T> void Fill(A (&array)[N], const T &val){std::fill( (T*)array, (T*)(array+N), val );}

    /* for debug */
    #define DEBUG(x) dbg(#x,x)
    template<class T> void dbg(string name, T x){cerr<<name<<": "<<x<<"\n";}
    template<> void dbg<P>(string name, P x){cerr<<name<<": ("<<x.first<<","<<x.second<<")\n";}
    template<class T> void dbg(string name, vector<T> xl){cerr<<name<<": "; for(T x: xl) cerr<<x<<" "; cerr<<'\n';}
    template<> void dbg<P>(string name, vector<P> xl){cerr<<name<<": "; for(P x:xl){cerr<<"("<<x.first<<","<<x.second<<"), ";}cerr<<"\n";}
    template<class T> void dbg(string name, vector<vector<T>> xl){ cerr<<name<<": \n"; int ml=1;for(vector<T> row: xl){for(T x:row){stringstream sstm; sstm<<x; ml=max(ml,(int)sstm.str().size());}}; for(vector<T> row: xl){{for(T x:row) cerr<<std::right<<std::setw(ml+1)<<x;} cerr << '\n';}}
    template<class T> void dbg(string name, set<T> xl){cerr<<name<<": "; for(T x:xl)cerr<<x<<" ";cerr<<'\n';}
    template<class T> void dbg(string name, multiset<T> xl){cerr<<name<<": "; for(T x:xl)cerr<<x;cerr<<'\n';}
    template<class T> void dbg(string name, unordered_set<T> xl){cerr<<name<<": "; for(T x:xl)cerr<<x<<" ";cerr<<'\n';}
    template<class T> void dbg(string name, unordered_multiset<T> xl){cerr<<name<<": "; for(T x:xl)cerr<<x;cerr<<'\n';}
    template<class T, class U> void dbg(string name, map<T,U> xl){cerr<<name<<": \n"; for(auto &[k,v]:xl)cerr<<"  "<<k<<": "<<v<<'\n';}
    template<class T, class U> void dbg(string name, unordered_map<T,U> xl){cerr<<name<<": \n"; for(auto &[k,v]:xl)cerr<<"  "<<k<<": "<<v<<'\n';}
}
using namespace defines;

const int IINF = 1'001'001'001;
const ll INF = 1'001'001'001'001'001'001ll;
const int MOD = 1'000'000'007;
// const int MOD = 998244353;
// using mint = modint1000000007;
// using mint = modint998244353;

const ll max2=262145;
// const ll max2=1025;
bool comp[max2];
ll dp[max2];
ll n,m;
vector<unordered_set<ll>> gl(20);
const ll MAX=10000;

ll rec(ll state){
    if(dp[state]!=MAX) return dp[state];
    if(comp[state]) return 1;
    for(ll t=state ; t>0 ; t=(t-1)&state){
        if(t==state)continue;
        dp[state] = min(rec(t)+rec(t^state), dp[state]);
    }
    return dp[state];
}

void solve(){
    Fill(dp,MAX);
    cin>>n>>m;
    REP(i,m){
        ll a,b; cin >> a >> b;
        a-=1;b-=1;
        gl[a].insert(b);
        gl[b].insert(a);
    }
    ll p2=pow(2,n);
    REP(i,p2){
        vector<ll> vl;
        REP(j,n){
            if((i>>j)%2==1)vl.push_back(j);
        }
        bool ok=true;
        REP(j1, vl.size()){
            REP(j2, vl.size()){
                if(j1==j2)continue;
                if( gl[vl[j1]].find(vl[j2])==gl[vl[j1]].end() ) {
                    ok=false;
                    break;
                }
            }
        }
        comp[i]=ok;
    }
    cout<<rec(p2-1)<<endl;

    // vector<int> aaa(begin(dp),end(dp));
    // DEBUG(aaa);
    //     vector<int> aa(begin(comp),end(comp));
    // DEBUG(aa);
    // DEBUG(aa[65]);
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    solve();
    return 0;
}
#include <bits/stdc++.h>
using namespace std;

#define nl "\n"
#define nf endl
#define ll long long
#define pb push_back
#define _ << ' ' <<
#define y1 bfrsoihgdfnm

#define INF (ll)1e18
#define mod 998244353
#define maxn 210

ll i, i1, j, k, k1, t, n, m, res, flag[10], a[maxn], b;
ll x1, y1, x, y, kn[maxn][maxn];
bool vis[maxn];
vector<ll> parent[maxn][maxn], rs[2];

ll bk(ll x, ll p) {
    if (p == 1) return (((x - a[i]) % 200) + 200) % 200;
    else return x;
}

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);

    #if !ONLINE_JUDGE && !EVAL
        ifstream cin("input.txt");
        ofstream cout("output.txt");
    #endif

    cin >> n;
    for (i = 1; i <= n; i++) {
        cin >> a[i];
    }

    kn[0][0] = 1;
    for (i = 1; i <= n; i++) {
        for (j = 0; j <= 199; j++) {
            k = (j + a[i]) % 200;
            kn[i][k] += kn[i - 1][j];
            kn[i][k] = min((ll)2, kn[i][k]);
            if (kn[i - 1][j] > 0) parent[i][k].pb(1);

            k = j;
            kn[i][k] += kn[i - 1][j];
            kn[i][k] = min((ll)2, kn[i][k]);
            if (kn[i - 1][j] > 0) parent[i][k].pb(0);
        }
    }

    m = -1;
    for (j = 0; j <= 199; j++) {
        if (kn[n][j] == 2) {
            m = j; break;
        }
    }

    if (m == -1) {
        cout << "NO" << nl; return 0;
    }

    k = m; i = n;
    while (parent[i][k].size() == 1) {
        k = bk(k, parent[i][k][0]); i--;
    }

    x = bk(k, parent[i][k][0]); y = bk(k, parent[i][k][1]);
    if (parent[i][k][0] == 1) rs[0].pb(i);
    else rs[1].pb(i);
    i--;

    while (i >= 1) {
        x1 = parent[i][x][0]; y1 = parent[i][y][0];
        x = bk(x, x1); y = bk(y, y1);
        if (x1 == 1) rs[0].pb(i);
        if (y1 == 1) rs[1].pb(i);
        i--;
    }

    sort(rs[0].begin(), rs[0].end());
    sort(rs[1].begin(), rs[1].end());

    if ((ll)rs[0].size() + (ll)rs[1].size() == n) {
        if (rs[0].empty()) {
            rs[0].pb(rs[1].back()); rs[1].pop_back();
        } else if (rs[1].empty()) {
            rs[1].pb(rs[0].back()); rs[0].pop_back();
        }
    } else {
        for (auto u : rs[0]) vis[u] = true;
        for (auto u : rs[1]) vis[u] = true;
        for (i = 1; i <= n; i++) {
            if (!vis[i]) {
                k = i; break;
            }
        }
        if (rs[0].empty() || rs[1].empty()) {
            rs[0].pb(k); rs[1].pb(k);
        }
    }

    sort(rs[0].begin(), rs[0].end());
    sort(rs[1].begin(), rs[1].end());

    cout << "YES" << nl;
    cout << rs[0].size() << ' ';
    for (auto u : rs[0]) cout << u << ' ';
    cout << nl;
    cout << rs[1].size() << ' ';
    for (auto u : rs[1]) cout << u << ' ';

    return 0;
}
