#include <bits/stdc++.h>
using namespace std;
int main() {
  int q, n, i, sum;
  cin >> q;
  while (q--) {
    cin >> n;
    sum = 0;
    int arr[n];
    for (i = 0; i < n; i++) cin >> arr[i];
    for (i = 0; i < n; i++) {
      if (arr[i] <= 2048) sum += arr[i];
    }
    if (sum >= 2048)
      cout << "yes"
           << "\n";
    else
      cout << "no"
           << "\n";
  }
  return 0;
}
