D: XORANDORBAN

Problem Statement

You are given a positive integer N. Your task is to determine a set S of 2^N integers satisfying the following conditions:

* All the integers in S are at least 0  and less than 2^{N+1}.
* All the integers in S are distinct.
* You are also given three integers X, A, and O, where 0 \leq X, A, O < 2^{N+1}. Then, any two integers (a, b) in S must satisfy a {\it xor} b \neq X, a {\it and} b \neq A, a {\it or} b \neq O, where {\it xor}, {\it and}, {\it or} are bitwise xor, bitwise and, bitwise or, respectively. Note that a and b are not necessarily different.



Input


N X A O

Constraints

* 1 \leq N \leq 13
* 0 \leq X, A, O < 2^{N+1}
* Inputs consist only of integers.



Output

If there is no set satisfying the conditions mentioned in the problem statement, output `No` in a line. Otherwise, output `Yes` in the first line, and then output 2^N integers in such a set in the second line. If there are multiple sets satisfying the conditions, you can output any of them.

Sample Input 1


2 6 1 5

Output for Sample Input 1


Yes
0 3 4 7


Sample Input 2


3 0 5 1

Output for Sample Input 2


No

Sample Input 3


3 4 2 5

Output for Sample Input 3


Yes
1 0 6 15 8 9 14 7






Example

Input

2 6 1 5


Output

Yes
0 3 4 7
#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define SZ(x) ((int)(x).size())
#define fi first
#define se second
typedef vector<int> VI;
typedef long long ll;
typedef pair<int,int> PII;
// head

const int N=201000;

VI e[N];
int n,cnt,dfn[N],low[N],st[N],bel[N],top,ind;
bool ins[N];
int x,a,o;
void tarjan(int u) {
	dfn[u]=low[u]=++ind;
	ins[u]=1;
	st[++top]=u;
	rep(i,0,SZ(e[u])) {
		int v=e[u][i];
		if (!dfn[v]) tarjan(v),low[u]=min(low[u],low[v]);
		else if (ins[v]) low[u]=min(low[u],low[v]);
	} 
	if (dfn[u]==low[u]) {
		++cnt;
		while (1) {
			bel[st[top]]=cnt;
			ins[st[top]]=0;
			if (st[top--]==u) break;
		}
	}
}

int main() {
	scanf("%d%d%d%d",&n,&x,&a,&o);
	if (x==0) {
		puts("No");
		return 0;
	}
	int m=1<<(n+1);
	rep(i,0,m) rep(j,i,m) {
		if ((i&j)==a) {
			e[i].pb(j^x);
			e[j].pb(i^x);
		}
		if ((i|j)==o) {
			e[i].pb(j^x);
			e[j].pb(i^x);
		}
	}
	rep(i,0,m) if (!dfn[i]) tarjan(i);
	VI ans;
	rep(i,0,m) {
		if (bel[i]==bel[i^x]) {
			puts("No");
			return 0;
		}
		if (bel[i]<bel[i^x]) ans.pb(i);
	}
	puts("Yes");
	rep(i,0,(m/2)) printf("%d%c",ans[i]," \n"[i==m/2-1]);
}
