#include <bits/stdc++.h>
using namespace std;
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;
}
int dy[] = {0, 0, 1, -1};
int dx[] = {
    1,
    -1,
    0,
    0,
};
long long gcd(long long a, long long b) {
  if (a < b) {
    a ^= b;
    b ^= a;
    a ^= b;
  }
  return b ? gcd(b, a % b) : a;
}
long long lcm(int a, long long b) { return a * b / gcd(a, b); }
long long power(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a % 1000000007;
    a = a * a % 1000000007;
    b >>= 1;
  }
  return res;
}
const int MAX = 510000;
long long fact[MAX], fact_inv[MAX];
void init_fact(long long n) {
  fact[0] = 1;
  for (long long i = 0; i < n; i++)
    fact[i + 1] = fact[i] * (i + 1) % 1000000007;
  fact_inv[n] = power(fact[n], 1000000007 - 2);
  for (long long i = n - 1; i >= 0; i--)
    fact_inv[i] = fact_inv[i + 1] * (i + 1) % 1000000007;
}
long long comb(long long n, long long r) {
  return (fact[n] * fact_inv[r]) % 1000000007 * fact_inv[n - r] % 1000000007;
}
long long perm(long long n, long long r) {
  return (fact[n] * fact_inv[n - r]) % 1000000007;
}
struct UnionFind {
  vector<long long> par;
  vector<long long> num;
  UnionFind(long long N) : par(N), num(N) {
    for (long long i = 0; i < N; i++) par[i] = i;
    for (long long i = 0; i < N; i++) num[i] = 1;
  }
  long long root(long long x) {
    if (par[x] == x) return x;
    return par[x] = root(par[x]);
  }
  void unite(long long x, long long y) {
    long long rx = root(x);
    long long ry = root(y);
    if (rx == ry) return;
    par[rx] = ry;
    num[ry] = num[rx] + num[ry];
  }
  bool same(long long x, long long y) {
    long long rx = root(x);
    long long ry = root(y);
    return rx == ry;
  }
  long long size(long long x) { return num[root(x)]; }
};
vector<long long> divisor(long long n) {
  vector<long long> ret;
  for (long long i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      ret.push_back(i);
      if (i * i != n) ret.push_back(n / i);
    }
  }
  sort(ret.begin(), ret.end());
  return ret;
}
long long my_pow(long long x, long long y) {
  long long rtn = 1;
  for (long long i = 0; i < y; i++) rtn *= x;
  return rtn;
}
long long get_digit_in(long long n, long long i) {
  for (long long j = 0; j < i - 1; j++) {
    n /= 10;
  }
  return n % 10;
}
long long get_digit(long long n) {
  long long rtn = 0;
  while (n > 0) {
    n /= 10;
    rtn++;
  }
  return rtn;
}
map<long long, long long> prime_factor(long long n) {
  map<long long, long long> rtn;
  for (long long i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      rtn[i]++;
      n /= i;
    }
  }
  if (n != 1) rtn[n] = 1;
  return rtn;
}
void foreach_permutation(long long n, function<void(long long *)> f) {
  long long indexes[n];
  for (long long i = 0; i < n; i++) indexes[i] = i;
  do {
    f(indexes);
  } while (std::next_permutation(indexes, indexes + n));
}
void recursive_comb(long long *indexes, long long s, long long rest,
                    function<void(long long *)> f) {
  if (rest == 0) {
    f(indexes);
  } else {
    if (s < 0) return;
    recursive_comb(indexes, s - 1, rest, f);
    indexes[rest - 1] = s;
    recursive_comb(indexes, s - 1, rest - 1, f);
  }
}
void foreach_comb(long long n, long long k, function<void(long long *)> f) {
  long long indexes[k];
  recursive_comb(indexes, n - 1, k, f);
}
void foreach_permutation(long long n, long long k,
                         function<void(long long *)> f) {
  foreach_comb(n, k, [&](long long *c_indexes) {
    foreach_permutation(k, [&](long long *p_indexes) {
      long long indexes[k];
      for (long long i = 0; i < k; i++) {
        indexes[i] = c_indexes[p_indexes[i]];
      }
      f(indexes);
    });
  });
}
long long arr[55556];
vector<long long> primes;
void Eratosthenes() {
  long long N = 55556;
  for (long long i = 0; i < N; i++) {
    arr[i] = 1;
  }
  for (long long i = 2; i < sqrt(N); i++) {
    if (arr[i]) {
      for (long long j = 0; i * (j + 2) < N; j++) {
        arr[i * (j + 2)] = 0;
      }
    }
  }
  for (long long i = 2; i < N; i++) {
    if (arr[i] && i % 5 == 1) {
      primes.push_back(i);
    }
  }
}
template <typename flow_t>
struct FordFulkerson {
  struct edge {
    int to;
    flow_t cap;
    int rev;
    bool isrev;
  };
  vector<vector<edge>> graph;
  vector<int> used;
  const flow_t INF;
  int timestamp;
  FordFulkerson(int n) : INF(numeric_limits<flow_t>::max()), timestamp(0) {
    graph.resize(n);
    used.assign(n, -1);
  }
  void add_edge(int from, int to, flow_t cap) {
    graph[from].emplace_back((edge){to, cap, (int)graph[to].size(), false});
    graph[to].emplace_back((edge){from, 0, (int)graph[from].size() - 1, true});
  }
  flow_t dfs(int idx, const int t, flow_t flow) {
    if (idx == t) return flow;
    used[idx] = timestamp;
    for (auto &e : graph[idx]) {
      if (e.cap > 0 && used[e.to] != timestamp) {
        flow_t d = dfs(e.to, t, min(flow, e.cap));
        if (d > 0) {
          e.cap -= d;
          graph[e.to][e.rev].cap += d;
          return d;
        }
      }
    }
    return 0;
  }
  flow_t max_flow(int s, int t) {
    flow_t flow = 0;
    for (flow_t f; (f = dfs(s, t, INF)) > 0; timestamp++) {
      flow += f;
    }
    return flow;
  }
  void output() {
    for (int i = 0; i < graph.size(); i++) {
      for (auto &e : graph[i]) {
        if (e.isrev) continue;
        auto &rev_e = graph[e.to][e.rev];
        cout << i << "->" << e.to << " (flow: " << rev_e.cap << "/"
             << e.cap + rev_e.cap << ")" << endl;
      }
    }
  }
};
int main() {
  cout << fixed << setprecision(10);
  long long N;
  cin >> N;
  vector<long long> a(N);
  for (long long i = 0; i < N; i++) cin >> a[i];
  sort(a.begin(), a.end());
  if (N == 3) {
    vector<long long> cnt(100, 0);
    for (long long i = 0; i < 3; i++) {
      long long j = 0;
      while (a[i] > 0) {
        if (a[i] & 1) {
          cnt[j]++;
        }
        j++;
        a[i] >>= 1;
      }
    }
    bool f = true;
    for (auto e : cnt) {
      if (e % 2 == 1) {
        f = false;
        break;
      }
    }
    if (f)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  } else {
    if (a[N - 1] == 0) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  }
}
