#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  int ans = 1;
  cin >> n;
  long long int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (n != 3) {
    ans = 0;
  } else {
    while (a[0] != 0 || a[1] != 0 || a[2] != 0) {
      if (a[0] % 2 + a[1] % 2 + a[2] % 2 == 2) {
        a[0] = a[0] / 2;
        a[1] = a[1] / 2;
        a[2] = a[2] / 2;
        continue;
      } else {
        ans = 0;
        break;
      }
    }
  }
  if (ans == 0) {
    cout << "No" << endl;
  } else {
    cout << "Yes" << endl;
  }
}
