#include<bits/stdc++.h>
using namespace std;
#define N 100005
#define int long long
int read(){
	int w=0,f=1;
	char c=' ';
	while(c<'0'||c>'9')c=getchar(),f=c=='-'?-1:f;
	while(c>='0'&&c<='9')w=w*10+c-48,c=getchar();
	return w*f;
}
int n,a[N];
bool vis[N];
signed main(){
	n=read();
	a[1]=1;
	for(int i=2;i<=n;i++){
		vis[1]=1;
		for(int j=2,k=sqrt(i);j<=k;j++)
			if(i%j==0)vis[a[j]]=vis[a[i/j]]=1;
		for(int j=1;!a[i];j++)
			if(!vis[j])a[i]=j;
		for(int j=2,k=sqrt(i);j<=k;j++)
			if(i%j==0)vis[a[j]]=vis[a[i/j]]=0;
	}
	for(int i=1;i<=n;i++)
		printf("%lld%c",a[i],i==n?'\n':' ');
	return 0;
}
#include <bits/stdc++.h>
#include <cmath>
#define rep(i,n) for (long long i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<long long,long long>;
//ll INF = 1e18;
//int INF = 1e9;
//printf("%.10f\n",ans);




int main() {
  
  int n;
  cin >> n;
  vector<ll> a(n);
  rep(i,n) cin >> a[i];
  rep(i,n) a[i] %= 200;
  vector<vector<int>> b(200,vector<int>(0));
  int cnt = min(n,8);
  for(int bit = 1; bit < (1<<cnt); ++bit){
    ll sum = 0;
    vector<int> s;
    for(int i = 0; i < cnt; ++i){
      if(bit & (1<<i)){
        sum += a[i];
        sum %= 200;
        s.push_back(i+1);
      }
    }
    sum %= 200;
   
    if(b[sum].size() != 0){
      cout << "Yes" << endl;
      
      int m1 = b[sum].size();
      cout << m1 << " ";
      rep(j,m1) cout << b[sum][j] << " ";
      cout << endl;
       
      int m2 = s.size();
      cout << m2 << " "; 
      rep(j,m2) cout << s[j] << " ";
      return 0;
    }
    b[sum] = s;
  }
  
  
  cout << "No" << endl;
  
  
  return 0;
}