Language: C++

#include<iostream>
#include<algorithm>
#include<math.h>
#include<string>
#include<vector>
#include<queue>
#include<deque>
#include<iomanip>
using namespace std;
typedef pair<ll, ll>P;
typedef pair<int, pair < int, int > > PP;
typedef long long ll;
ll inf = -1;
ll mod = pow(10, 9) + 7;
int main() {
	int n;cin>>n;
	vector<ll> a(n);
	for(int i=0;i<n;i++){
		cin>>a[i];
	}
	sort(a.begin(),a.end());
	vector<P>cnt;
	ll c=1;
	for(int i=1;i<n;i++){
		if(a[i-1]==a[i]){
			c++;
		}else{
			cnt.push_back(P(a[i-1],c));
			c=1;
		}
		if(i==n-1){
			cnt.push_back(P(a[i],c));
		}
	}
	if(cnt.size()==3&&(cnt[0].second==cnt[1].second)
	==cnt[2].second){
		if((cnt[0].first^cnt[1].first)==cnt[2].first){
			cout<<"Yes"<<endl;
			return 0;
		}
	}
		cout<<"No"	<<endl;
	
	return 0;
}

Compiler output:
a.cc:10:14: error: 'll' was not declared in this scope
   10 | typedef pair<ll, ll>P;
      |              ^~
a.cc:10:18: error: 'll' was not declared in this scope
   10 | typedef pair<ll, ll>P;
      |                  ^~
a.cc:10:20: error: template argument 1 is invalid
   10 | typedef pair<ll, ll>P;
      |                    ^
a.cc:10:20: error: template argument 2 is invalid
a.cc: In function 'int main()':
a.cc:28:49: error: expression list treated as compound expression in functional cast [-fpermissive]
   28 |                         cnt.push_back(P(a[i-1],c));
      |                                                 ^
a.cc:28:46: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = long long int; _Alloc = std::allocator<long long int>; reference = long long int&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   28 |                         cnt.push_back(P(a[i-1],c));
      |                                              ^
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:5:
/usr/include/c++/14/bits/stl_vector.h:1128:7: note: declared here
 1128 |       operator[](size_type __n) _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
a.cc:32:47: error: expression list treated as compound expression in functional cast [-fpermissive]
   32 |                         cnt.push_back(P(a[i],c));
      |                                               ^
a.cc:32:44: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = long long int; _Alloc = std::allocator<long long int>; reference = long long int&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   32 |                         cnt.push_back(P(a[i],c));
      |                                            ^
/usr/include/c++/14/bits/stl_vector.h:1128:7: note: declared here
 1128 |       operator[](size_type __n) _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
a.cc:35:35: error: request for member 'second' in 'cnt.std::vector<int>::operator[](0)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   35 |         if(cnt.size()==3&&(cnt[0].second==cnt[1].second)
      |                                   ^~~~~~
a.cc:35:50: error: request for member 'second' in 'cnt.std::vector<int>::operator[](1)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   35 |         if(cnt.size()==3&&(cnt[0].second==cnt[1].second)
      |                                                  ^~~~~~
a.cc:36:18: error: request for member 'second' in 'cnt.std::vector<int>::operator[](2)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   36 |         ==cnt[2].second){
      |                  ^~~~~~
a.cc:37:28: error: request for member 'first' in 'cnt.std::vector<int>::operator[](0)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   37 |                 if((cnt[0].first^cnt[1].first)==cnt[2].first){
      |                            ^~~~~
a.cc:37:41: error: request for member 'first' in 'cnt.std::vector<int>::operator[](1)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   37 |                 if((cnt[0].first^cnt[1].first)==cnt[2].first){
      |                                         ^~~~~
a.cc:37:56: error: request for member 'first' in 'cnt.std::vector<int>::operator[](2)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   37 |                 if((cnt[0].first^cnt[1].first)==cnt[2].first){
      |                                                        ^~~~~