// D - Happy Birthday! 2
#include <bits/stdc++.h>
using namespace std;
#define vec vector
using vi = vec<int>;
#define rp(i,s,e) for(int i=(s);i<(e);++i)
#define sz(a) int(a.size())

int N;
vi A(200);
vec<vi> B(200);

void print(int n, vi v){
	cout<< n <<" "; rp(i, 0, n) cout<< v[i] << (i<n-1? " ":"\n");
}

void dfs(int n, int r, vi C){
	if(sz(C) == n){
		if(!sz(B[r])){ B[r] = C; return; }
		puts("Yes"); print(sz(B[r]), B[r]); print(sz(C), C);
		exit(0);
	}
	rp(i, C.back(), N){
		C.push_back(i+1);
		dfs(n, (r + A[i])%200, C);
		C.pop_back();
	}
	return;
}

int main(){
	cin>>N;
	N = min(8, N); // 8bit: 2^8=256
	for(int&x:A) cin>>x;
	rp(n, 1, N+1) rp(i, 0, N) dfs(n, A[i]%200, {i+1});
	puts("No");
}

#include <iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<map>
#include<set>
#include<stack>
#include<queue>
#include<math.h>
using namespace std;
typedef long long ll;
#define int long long
#define double long double
typedef vector<int> VI;
typedef pair<int, int> pii;
typedef vector<pii> VP;
typedef vector<string> VS;
typedef priority_queue<int> PQ;
template<class T>bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; }
#define fore(i,a) for(auto &i:a)
#define REP(i,n) for(int i=0;i<n;i++)
#define eREP(i,n) for(int i=0;i<=n;i++)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define eFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define SORT(c) sort((c).begin(),(c).end())
#define rSORT(c) sort((c).rbegin(),(c).rend())
#define LB(x,a) lower_bound((x).begin(),(x).end(),(a))
#define UB(x,a) upper_bound((x).begin(),(x).end(),(a))
#define INF 1000000000
#define LLINF 9223372036854775807
#define mod 1000000007
#define eps 1e-12 
//priority_queue<int,vector<int>, greater<int> > q2;


VI yaku(int n) {
	vector<int> ret;
	for (int i = 1; i*i <= n; ++i) {
		if (n%i == 0) {
			ret.push_back(i);
			if (i*i != n) {
				ret.push_back(n / i);
			}
		}
	}
	SORT(ret);
	return ret;
}
signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	int N; cin >> N;
	N *= 2;
	VI A = yaku(N);
	int ans = 0;
	REP(i, A.size()) {
		int n = A[i];
		//cout << n << " ";
		int b = N / n;
		//cout << b - n + 1<< endl;
		if ((b - n + 1) % 2 == 0)ans++;
	}



	cout << ans << endl;

	//REP(i, A.size())cout << A[i] << " ";

	return 0;
}

