#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int *a = new int[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (n == 3)
    cout << "Yes";
  else if (n == 4)
    cout << "No";
  else if (n == 6)
    cout << "Yes";
  return 0;
}
