#include <bits/stdc++.h>
using namespace std;
const int INT_INF = 1e9;
const long long INF = 1LL << 30;
int main() {
  int n;
  cin >> n;
  vector<long long> a(n);
  map<long long, long long> m;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    m[a[i]] = 2;
  }
  bool ans = true;
  for (int i = 0; i < n; i++) {
    long long tmp = a[i];
    if (m[-(~a[i])] && m[a[i] | -(~a[i])]) {
      m[-(~a[i])]--;
      m[a[i] | -(~a[i])]--;
      continue;
    }
    bool flag = false;
    for (long long j = 0; j <= (tmp / 2); j++) {
      if (m[j] && m[tmp - j]) {
        m[j]--;
        m[tmp - j]--;
        flag = true;
        break;
      }
    }
    if (flag) {
      continue;
    } else {
      ans = false;
      break;
    }
  }
  if (ans)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
