#include <bits/stdc++.h>
using namespace std;
int main() {
  int p;
  cin >> p;
  while (p--) {
    int a, b, c = 0;
    cin >> a;
    long long int A[a];
    for (b = 0; b < a; b++) {
      cin >> A[b];
      if (A[b] <= 2048) c = c + A[b];
    }
    if (c >= 2048)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
}
