#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define all(x) (x).begin(), (x).end()
#define io ios::sync_with_stdio(false); cin.tie(0)

void print_vec(const vector<int>& vec) {
    int n = vec.size();
    cout << n << " ";
    rep(i, n) {
        cout << vec[i];
        if (i != n-1) cout << " ";
    }
    cout << endl;
}

int main()
{
    io;
    int n; cin >> n;
    vector<ll> a(n);
    rep(i, n) cin >> a[i];
    int x = min(n, 8);
    vector<vector<int>> cnt(200);
    rep(bit, 1 << x) {
        int s = 0;
        vector<int> temp;
        rep(i, x) {
            if (bit & (1 << i)) {
                temp.push_back(i+1);
                s += a[i];
                s %= 200;
            }
        }
        if (cnt[s].size()) {
            cout << "Yes" << endl;
            print_vec(cnt[s]);
            print_vec(temp);
            return 0;
        } else cnt[s] = temp;
    }
    cout << "No" << endl;
    return 0;
}
// Author : Sarthak Kapoor
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define int ll
#define rep(i,n) for(int i=0;i<n;++i)
#define repa(i,a,n) for(int i=a;i<n;++i)
#define repr(i,n) for(int i=n-1;i>=0;--i)
#define ll long long
#define pi pair<int,int> 
#define pii pair<pi,int>
#define vi vector<int>
#define pb push_back 
#define fi first
#define sec second
#define all(v) v.begin(),v.end()
#define s(v) v.size()
ll mod = 1000000007;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());//use rng()%n for numbers in range [0,n-1]
ll gcd(ll a,ll b){
	if(b==0)return a;
	return gcd(b,a%b);
}
ll fastexp(ll x,ll a){
    ll res = 1;
    while(a>0){
        if(a&1){
            res = (res*x)%mod;
        }
        a=a>>1;
        x=(x*x)%mod;
    }
    return res;
}
ll inverse(ll n){
    return fastexp(n,mod-2);
}
template <typename T>
void add(T &a, T b){
	a += b;
	if(a >= mod)a -= mod;
}
template <typename T>
void sub(T &a, T b){
	a -= b;
	if(a < 0)a += mod;
}
template <typename T>
void mul(T &a, T b){
	a *= b;
	if(a >= mod)a %= mod;
}
signed main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	int n;
	cin>>n;
	vi v(n);
	rep(i,n){
		cin>>v[i];
	}
	int offset = 0;
	map<int,int> mp;
	mp[v[0]]++;
	int ans = 0;
	repa(i,1,n){
		if(i%2 == 1){
			ans += mp[-offset+v[i]];
			offset -= v[i];
			mp[-v[i]-offset]++;
		}
		else{
			ans += mp[-offset-v[i]];
			offset += v[i];
			mp[-offset+v[i]]++;
		}
		// cout<<i<<" "<<ans<<"\n";
		// for(auto x:mp){
		// 	cout<<x.fi<<" "<<x.sec<<"\n";
		// }
		// // cout<<"\n";
		// cout<<offset<<" offset\n\n";
	}
	cout<<ans;
	return 0;
}