Language: C++

#include<bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i)
#define REP(i,num,n) for(ll i=num, i##_len=(n); i<i##_len; ++i)
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 print(x) cout << (x) << endl;
#define sz(x) int(x.size())
 
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
const ll LLINF = 1LL<<60;
const int INF = 1<<29;
const int MOD = 1000000007;
 
void add(long long &a, long long b) {
  a += b;
  if (a >= MOD) a -= MOD;
}
 
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};


int main(void){
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout<<fixed<<setprecision(10);
    ll N;
    cin >> N;
    vector<ll> a(N);
    map<ll,ll> m;
    rep(i,N) cin >> a[i], m[a[i]]++;
    if(N % 3 != 0 || m.size() == 1){
      rep(i,N){
        if(a[i]) print("No"), return 0;
      }
      print("Yes");
      return 0;
    }
    if(m.size() == 2){
      ll count = 0;
      rep(i,N) if(!a[i]) count++;
      if(count == N / 3) print("Yes"), return 0;
      print("No");
      return 0;
    }
    ll tmp = 0;
    if(m.size() == 3){
      for(auto itr = num.begin(); itr != num.end(); ++itr){
        if(itr->second() != N / 3) print("No"), return 0;
        tmp ^= itr->first;
      }
      if(!tmp) print("Yes"), return 0;
      print("No"), return 0;
    }
    if(m.size() > 3) print("No"), return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:29: error: expected primary-expression before ',' token
   38 |         if(a[i]) print("No"), return 0;
      |                             ^
a.cc:38:31: error: expected primary-expression before 'return'
   38 |         if(a[i]) print("No"), return 0;
      |                               ^~~~~~
a.cc:46:38: error: expected primary-expression before ',' token
   46 |       if(count == N / 3) print("Yes"), return 0;
      |                                      ^
a.cc:46:40: error: expected primary-expression before 'return'
   46 |       if(count == N / 3) print("Yes"), return 0;
      |                                        ^~~~~~
a.cc:52:22: error: 'num' was not declared in this scope; did you mean 'enum'?
   52 |       for(auto itr = num.begin(); itr != num.end(); ++itr){
      |                      ^~~
      |                      enum
a.cc:53:47: error: expected primary-expression before ',' token
   53 |         if(itr->second() != N / 3) print("No"), return 0;
      |                                               ^
a.cc:53:49: error: expected primary-expression before 'return'
   53 |         if(itr->second() != N / 3) print("No"), return 0;
      |                                                 ^~~~~~
a.cc:56:28: error: expected primary-expression before ',' token
   56 |       if(!tmp) print("Yes"), return 0;
      |                            ^
a.cc:56:30: error: expected primary-expression before 'return'
   56 |       if(!tmp) print("Yes"), return 0;
      |                              ^~~~~~
a.cc:57:18: error: expected primary-expression before ',' token
   57 |       print("No"), return 0;
      |                  ^
a.cc:57:20: error: expected primary-expression before 'return'
   57 |       print("No"), return 0;
      |                    ^~~~~~
a.cc:59:33: error: expected primary-expression before ',' token
   59 |     if(m.size() > 3) print("No"), return 0;
      |                                 ^
a.cc:59:35: error: expected primary-expression before 'return'
   59 |     if(m.size() > 3) print("No"), return 0;
      |                                   ^~~~~~