#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
int a[50];
int cal(int x) {
  for (int i = 0; i < 32; i++) {
    if (1 << i == x) return i;
  }
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    memset(a, 0, sizeof(a));
    int n;
    scanf("%d", &n);
    int num;
    for (int i = 0; i < n; i++) {
      scanf("%d", &num);
      a[cal(num)]++;
    }
    for (int i = 0; i < 32; i++) {
      a[i] += (a[i - 1] / 2);
    }
    if (a[11] >= 1)
      printf("YES\n");
    else
      printf("NO\n");
  }
}
