#include <iostream>
#include<stdio.h>
#include<math.h>
#include<algorithm>
using namespace std;
int NStone[200001];
int main()
{
int n,sum,sum1;
while(cin>>n&&n!=0)
{
sum=0;
for(int i=0;i<n;i++)
{
scanf("%d",&NStone[i]);
sum=sum^NStone[i];
}
if(sum==0)
printf("No\n");
//cout<<"No"<<endl;
else
{
printf("Yes\n");
//cout<<"Yes"<<endl;
for(int j=0;j<n;j++)
{
sum1=sum^NStone[j];
if(sum1<NStone[j])
printf("%d %d\n",NStone[j],sum1);
}
}
//cout<<(sum==0?"No":"Yes")<<endl;
}
//cout << "Hello world!" << endl;
return 0;
}
#include<stdio.h>
#include<math.h>
#include<algorithm>
using namespace std;
int NStone[200001];
int main()
{
int n,sum,sum1;
while(cin>>n&&n!=0)
{
sum=0;
for(int i=0;i<n;i++)
{
scanf("%d",&NStone[i]);
sum=sum^NStone[i];
}
if(sum==0)
printf("No\n");
//cout<<"No"<<endl;
else
{
printf("Yes\n");
//cout<<"Yes"<<endl;
for(int j=0;j<n;j++)
{
sum1=sum^NStone[j];
if(sum1<NStone[j])
printf("%d %d\n",NStone[j],sum1);
}
}
//cout<<(sum==0?"No":"Yes")<<endl;
}
//cout << "Hello world!" << endl;
return 0;
}