unittest
{
	assert( [ "3", "1 2 3" ].parse.expand.solve == "Yes" );
	assert( [ "4", "1 2 4 8" ].parse.expand.solve == "No" );
}



import std.conv;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	input.popFront;
	auto as = input.front.split.to!( long[] );
	return tuple( as );
}

auto solve( long[] as )
{
	long[ long ] cs;
	foreach( a; as ) cs[ a ] += 2;
	auto ct = as.length.signed;
	foreach( i, x; as )
	{
		foreach( y; as[ i + 1 .. $ ] )
		{
			if( solve2( cs, ct, x, y ) ) return "Yes";
		}
	}
	return "No";
}

bool solve2( ref long[ long ] cs, long ct, long x, long y )
{
	if( ct == 0 ) return ( cs[ x ] == 0 && cs[ y ] == 0 );
	
	auto z = x ^ y;
	if( cs[ x ] <= 0 || cs[ x ] <= 0 || z !in cs ) return false;
	
	cs[ x ]--;
	cs[ y ]--;
	auto r = solve2( cs, ct - 1, y, z );
	if( !r )
	{
		cs[ x ]++;
		cs[ y ]++;
	}
	return r;
}
