#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ALL(array) array.begin(), array.end()
#define print(x) cout << x << endl;
#define pb push_back
using namespace std;
typedef long long ll;
typedef string str;
ll INF = 10e9;

//Aのiからj番目まで表示
int print_array(vector<int> A,int i,int j){
    FOR(k,i,j){
        cout << A[k] << " ";
    }
    print(A[j]);
    return 0;
}

int main()
{
    int N;
    cin >> N;
    vector<int> A(N);
    REP(i,N){
        ll a;
        cin >> a;
        A[i] = a % 200;
    }

    str ans = "No";
    if (N>=8){
        N = 8;
        vector<vector<int>> B(pow(2, N) - 1, vector<int>(0));
        for (int bit = 1; bit < (1 << N); ++bit)
        {
            vector<int> c;
            int sum = 0;
            for (int i = 0; i < N; ++i)
            {
                if (bit & (1 << i))
                {
                    c.pb(i + 1);
                    sum += A[i];
                }
            }

            B[bit - 1].pb(sum % 200);
            FOR(i, 0, c.size())
            {
                B[bit - 1].pb(c[i]);
            }
        }

        sort(ALL(B));
        FOR(i, 1, B.size())
        {
            if (B[i][0] == B[i - 1][0])
            {
                ans = "Yes";
                print(ans);
                //x
                cout << B[i].size() - 1 << " ";
                print_array(B[i], 1, B[i].size() - 1);
                //y
                cout << B[i - 1].size() - 1 << " ";
                print_array(B[i - 1], 1, B[i - 1].size() - 1);
                break;
            }
        }
    } 
    else { // N<8のときbit全探索
        vector<vector<int>> B(pow(2,N)-1, vector<int>(0));
        for (int bit = 1; bit < (1 << N); ++bit)
        {
            vector<int> c;
            int sum = 0;
            for (int i = 0; i < N; ++i)
            {
                if (bit & (1 << i)){
                    c.pb(i+1);
                    sum += A[i];
                }
            }

            B[bit-1].pb(sum%200);
            FOR(i,0,c.size()){
                B[bit - 1].pb(c[i]);
            }
        }

        sort(ALL(B));
        FOR(i,1,B.size()){
            if (B[i][0]==B[i-1][0]){
                ans = "Yes";
                print(ans);
                //x
                cout << B[i].size() - 1 << " ";
                print_array(B[i], 1, B[i].size() - 1);
                //y
                cout << B[i-1].size() - 1 << " ";
                print_array(B[i-1], 1, B[i-1].size() - 1);
                break;
            }
        }

        if (ans == "No"){
            print(ans);
        }
    }
    return 0;
}
#include <bits/stdc++.h>
using namespace std;

const int mod = 998244353;

int a[200001], visited[200001] = {0};

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    int n;
    cin >> n;
    for (int i = 1; i <= n; ++i) cin >> a[i];
    int cnt = 0, ans = 0;
    for (int i = 1; i <= n; ++i)
        if (!visited[i]) {
            ++cnt;
            visited[i] = cnt;
            for (int j = a[i]; ; j = a[j])
                if (visited[j]) {
                    if (visited[j] == cnt) ++ans;
                    break;
                } else visited[j] = cnt;
        }
    cnt = 1;
    while (ans--) cnt = cnt * 2 % mod;
    cnt = (cnt + mod - 1) % mod;
    cout << cnt;
}