#include <bits/stdc++.h>
using namespace std;
int main() {
  int q, x;
  cin >> q;
  while (q--) {
    priority_queue<int, vector<int>, greater<int>> pq;
    int n, ok = 0;
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> x;
      if (x == 2048) ok = 1;
      if (!ok) pq.push(x);
    }
    if (ok) {
      cout << "yes" << endl;
      continue;
    }
    int g[2];
    while (!ok && pq.size() > 1) {
      g[0] = pq.top();
      pq.pop();
      g[1] = pq.top();
      if (g[0] == g[1]) {
        pq.pop();
        if (g[0] == 1024) ok = 1;
        pq.push(g[0] * 2);
      }
    }
    cout << (ok ? "yes" : "no") << endl;
  }
  return 0;
}
