#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  vector<int> b(n);
  bool flag = false;
  for (int tsumugi = 0; tsumugi < n - 1; tsumugi++) {
    for (int matsuri = tsumugi; matsuri < n; matsuri++) {
      if (a[0] ^ a[tsumugi] ^ a[matsuri] == 0) {
        b[0] = a[0];
        b[1] = a[tsumugi];
        b[2] = b[matsuri];
        a[0] = 0;
        a[tsumugi] = 0;
        a[matsuri] = 0;
        flag = true;
        break;
      }
      if (flag == true) break;
    }
  }
  if (flag == false) {
    cout << "No" << endl;
    return 0;
  }
  if (n < 4) {
    cout << "Yes";
    return 0;
  }
  int count_b = 0;
  for (int tomoka = 0; tomoka < n - 3; tomoka++) {
    flag = false;
    for (int nao = 0; nao < n; nao++) {
      if (a[nao] == 0) continue;
      if (b[count_b] ^ b[count_b + 1] ^ a[nao] == 0) {
        b[count_b + 2] = a[nao];
        a[nao] = 0;
        count_b++;
        flag = true;
        break;
      }
    }
    if (flag == false) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
