#include <bits/stdc++.h>
using namespace std;
int main() {
  int q;
  int n;
  cin >> q;
  for (int i = 0; i < q; i++) {
    int ans = 0;
    cin >> n;
    int a;
    for (int j = 0; j < n; j++) {
      cin >> a;
      if (a <= 2048) ans += a;
    }
    if (ans >= 2048)
      cout << "Yes" << '\n';
    else
      cout << "No" << '\n';
  }
}
