#include <bits/stdc++.h>
using namespace std;
bool prime[100001];
bool ispoweroftwo(long long int x) { return x && !(x & (x - 1)); }
long long int xorcal(long long int n) {
  if (n % 4 == 0) return n;
  if (n % 4 == 1) return 1;
  if (n % 4 == 2) return n + 1;
  if (n % 4 == 3) return 0;
}
void sieve(long long int n) {
  memset(prime, true, sizeof(prime));
  prime[0] = false;
  prime[1] = false;
  for (long long int i = 2; i * i <= n; i++) {
    if (prime[i] == true) {
      for (long long int j = i * i; j <= n; j += i) {
        prime[j] = false;
      }
    }
  }
  cout << prime[89] << '\n';
}
bool isprime(long long int n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 or n % 3 == 0) return false;
  for (long long int i = 5; i * i <= n; i += 6) {
    if (n % i == 0 or n % (i + 2) == 0) return false;
  }
  return true;
}
long long int modinverse(long long int a, long long int m) {
  long long int m0 = m;
  long long int y = 0, x = 1;
  if (m == 1) return 0;
  while (a > 1) {
    long long int q = a / m;
    long long int t = m;
    m = a % m;
    a = t;
    t = y;
    y = x - q * y;
    x = t;
  }
  if (x < 0) x += m0;
  return x;
}
long long int gcd(long long int a, long long int b) {
  if (a == 0) {
    return b;
  }
  return (b % a, a);
}
long long int power(long long int A, long long int B) {
  if (A == 0) return 0;
  if (B == 0) return 1;
  long long int y;
  if (B % 2 == 0) {
    y = power(A, B / 2);
    y = (y * y) % 1000000007;
  } else {
    y = A % 1000000007;
    y = (y * power(A, B - 1) % 1000000007) % 1000000007;
  }
  return (long long int)((y + 1000000007) % 1000000007);
}
void findPair(long long int arr[], long long int n) {
  unordered_set<long long int> s;
  for (long long int i = 0; i < n; i++) s.insert(arr[i]);
  bool found = false;
  for (long long int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if (s.find(arr[i] ^ arr[j]) != s.end()) {
        found = true;
      }
    }
  }
  if (found == false)
    cout << "No" << endl;
  else
    cout << "Yes" << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  long long int n;
  cin >> n;
  long long int a[n];
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
  }
  findPair(a, n);
  return 0;
}
