#include <bits/stdc++.h>
using namespace std;
static const double PI = acos(-1.0);
static const double EPS = 1e-8;
static const int SEED = 131;
static const int OO = 0X3fffffff;
inline int read1() {
  int x = 0;
  int f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 1) + (x << 3) + (ch - '0');
    ch = getchar();
  }
  x *= f;
  return x;
}
struct buf {
  operator int() {
    int x = 0, y = 0, c = getchar();
    while (c < 48) y = c == 45, c = getchar();
    while (c > 47) x = (x << 1) + (x << 3) + (c - 48), c = getchar();
    return y ? -x : x;
  }
} read;
inline void write(int x) {
  int y = 10, len = 1;
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  while (y <= x) {
    y *= 10;
    ++len;
  }
  while (len--) {
    y /= 10;
    putchar(x / y + 48);
    x %= y;
  }
}
static const int MAXN = 1e5 + 10;
int a[MAXN];
int n;
long long sum = 1;
int main() {
  scanf("%d", &n);
  bool flag = 1;
  bool two = 0;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    sum *= a[i];
    if (a[i] == 1) continue;
    if (i > 2) {
      two = 1;
      if (sum % 4 != 0) flag = 0;
    }
  }
  if (flag && two) {
    puts("Yes");
  } else
    puts("No");
}
