#include <bits/stdc++.h>

using namespace std;

#define mtask

void solve(){
    int n;
    cin >> n;
    int rs = 0;
    for(int i = 0; i < n; ++i){
        long long x;
        cin >> x;
        if(x < 4){
            continue;
        }
        if(x % 4 == 0){
            rs ^= 1;
        }
        else if(x % 2 == 0){
            rs ^= 2;
        }
    }
    if(rs == 0){
        cout << "No\n";
        return;
    }
    cout << "Yes\n";
}

int main() {
    ios_base::sync_with_stdio(false);
#ifdef LOCAL
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
#endif
#ifdef mtask
    int t;
    cin >> t;
    while(t--)
#endif
    solve();
    // TIP See CLion help at <a href="https://www.jetbrains.com/help/clion/">jetbrains.com/help/clion/</a>. Also, you can try interactive lessons for CLion by selecting 'Help | Learn IDE Features' from the main menu.
}