#include<bits/stdc++.h>
using namespace std;
vector<int> b[205];
int n,a[205],c[205],d[205];
bool mk[205];
void dfs(int x,int y,int u,int v){
	if(u%200==v%200&&x!=0&&y!=0){
		sort(c+1,c+x+1);
		sort(d+1,d+y+1);
		printf("Yes\n");
		printf("%d ",x);
		for(int i=1;i<=x;i++)printf("%d ",c[i]);
		printf("\n");
		printf("%d ",y);
		for(int i=1;i<=y;i++)printf("%d ",d[i]);
		printf("\n");
		exit(0);
	}
//	for(int i=0;i<200;i++){
//		for(int j=0;j<b[i].size();j++){
//			if(!mk[b[i][j]]){
//				mk[b[i][j]]=1;
//				c[x+1]=b[i][j];
//				dfs(x+1,y,u+i,v);
//				for(int p=0;p<200;p++){
//					for(int q=0;q<b[p].size();q++){
//						if(!mk[b[p][q]]){
//							mk[b[p][q]]=1;
//							d[y+1]=b[p][q];
//							dfs(x+1,y+1,u+i,v+p);
//							mk[b[p][q]]=0;
//						}
//					}
//				}
//				mk[b[i][j]]=0;
//			}
//		}
//	}
	for(int p=0;p<200;p++){
		for(int q=0;q<b[p].size();q++){
			if(!mk[b[p][q]]){
				mk[b[p][q]]=1;
				d[y+1]=b[p][q];
				dfs(x,y+1,u,v+p);
				for(int i=0;i<200;i++){
					for(int j=0;j<b[i].size();j++){
						if(!mk[b[i][j]]){
							mk[b[i][j]]=1;
							c[x+1]=b[i][j];
							dfs(x+1,y+1,u+i,v+p);
							mk[b[i][j]]=0;
						}
					}
				}
				mk[b[p][q]]=0;
			}
		}
	}
}
bool check(){
	for(int i=0;i<200;i++)
		if(b[i].size()>=2){
			printf("Yes\n");
			printf("1 %d\n",b[i][0]);
			printf("1 %d\n",b[i][1]);
			exit(0);
		}
	return false;
}
int main(){
	scanf("%d",&n);
	for(int i=1;i<=n;i++){
		scanf("%d",&a[i]);
		b[a[i]%200].push_back(i);
	}
	if(!check()){
		for(int i=0;i<200;i++){
			for(int j=0;j<b[i].size();j++){
				if(!mk[b[i][j]]){
					mk[b[i][j]]=1;
					c[1]=b[i][j];
					dfs(1,0,i,0);
					mk[b[i][j]]=0;
				}
			}
		}
	}
	printf("No");
	return 0;
}
#include <bits/stdc++.h>
using namespace std;

#define fo(i, x, y) for (int i = (x); i <= (y); ++i)
#define fd(i, x, y) for (int i = (x); i >= (y); --i)

typedef long long ll;

const int maxn = 1e5 + 5;
const double inf = 1e18;

int n;
ll a[maxn];

int getint()
{
	char ch;
	int res = 0, p;
	while (!isdigit(ch = getchar()) && (ch ^ '-'));
	p = ch == '-'? ch = getchar(), -1 : 1;
	while (isdigit(ch))
		res = (res << 3) + (res << 1) + (ch ^ 48), ch = getchar();
	return res * p;
}

int main()
{
	//freopen("t.in", "r", stdin);
	n = getint();
	ll sum = 0;
	fo(i, 1, n) scanf("%lld", &a[i]), sum += a[i];
	sort(a + 1, a + 1 + n);
	double ans = inf;
	ll pre = 0;
	fo(i, 1, n)
	{
		pre += a[i];
		double x = a[i] / 2.0;
		ans = min(ans, x + 1.0 * sum / n - 1.0 * (pre + a[i] * (n - i)) / n);
	}
	printf("%.8f\n", ans);
	return 0;
}
