Polycarp has a string s[1 ... n] of length n consisting of decimal digits. Polycarp performs the following operation with the string s no more than once (i.e. he can perform operation 0 or 1 time): 

  * Polycarp selects two numbers i and j (1 ≤ i ≤ j ≤ n) and removes characters from the s string at the positions i, i+1, i+2, …, j (i.e. removes substring s[i ... j]). More formally, Polycarp turns the string s into the string s_1 s_2 … s_{i-1} s_{j+1} s_{j+2} … s_{n}. 



For example, the string s = "20192020" Polycarp can turn into strings: 

  * "2020" (in this case (i, j)=(3, 6) or (i, j)=(1, 4)); 
  * "2019220" (in this case (i, j)=(6, 6)); 
  * "020" (in this case (i, j)=(1, 5)); 
  * other operations are also possible, only a few of them are listed above. 



Polycarp likes the string "2020" very much, so he is wondering if it is possible to turn the string s into a string "2020" in no more than one operation? Note that you can perform zero operations.

Input

The first line contains a positive integer t (1 ≤ t ≤ 1000 ) — number of test cases in the test. Then t test cases follow.

The first line of each test case contains an integer n (4 ≤ n ≤ 200) — length of the string s. The next line contains a string s of length n consisting of decimal digits. It is allowed that the string s starts with digit 0.

Output

For each test case, output on a separate line: 

  * "YES" if Polycarp can turn the string s into a string "2020" in no more than one operation (i.e. he can perform 0 or 1 operation); 
  * "NO" otherwise. 



You may print every letter of "YES" and "NO" in any case you want (so, for example, the strings yEs, yes, Yes and YES will all be recognized as positive answer).

Example

Input


6
8
20192020
8
22019020
4
2020
5
20002
6
729040
6
200200


Output


YES
YES
YES
NO
NO
NO

Note

In the first test case, Polycarp could choose i=3 and j=6.

In the second test case, Polycarp could choose i=2 and j=5.

In the third test case, Polycarp did not perform any operations with the string.
#include <bits/stdc++.h>
#include <cassert>
#define all(x) x.begin(), x.end()
#define debug(x) cerr << "[" << (#x) << " is " << (x) << "] "
#define debugl(x) cerr << "[" << (#x) << " is " << (x) << "]" << endl
#define eb emplace_back
#define FAST_IO ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);cerr.tie(0)
#define len(x) ((int) sizeof(x)/sizeof(x[0]))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define mp make_pair
#define output_time cerr << endl << "Time elapsed: " << 1000*clock() / CLOCKS_PER_SEC << "ms" << endl
#define pb push_back
#define sep cerr << "-----------------------------" << endl
#define test_cases int MMR; cin>>MMR; for (int i = 0; i < MMR; i++) solve()
#define test_input freopen("/home/jpark9013/CLionProjects/USACO/input.txt", "r", stdin)
#define test_local freopen("/home/jpark9013/CLionProjects/USACO/input.txt", "r", stdin); freopen("/home/jpark9013/CLionProjects/USACO/output.txt", "w", stdout); freopen("/home/jpark9013/CLionProjects/USACO/error.txt", "w", stderr)
using ld = long double;
using ll = long long;
using uint = unsigned int;
using ull = unsigned long long;
using namespace std;
using pii = pair<int, int>;
using pld = pair<ld, ld>;
using pll = pair<ll, ll>;
template<class T> using minpq = priority_queue<T, vector<T>, greater<T>>;
template<class T> using maxpq = priority_queue<T, vector<T>>;

const int INTMAX = 2147483647;
const int INTMIN = -2147483647;
const ll LLMAX = 9223372036854775807;
const ll LLMIN = -9223372036854775807;
const ll MOD = 1000000007;
const ll MOD998 = 998224353;
const ld pi = 3.1415926535897932385;


struct custom_hash {
  static uint64_t splitmix64(uint64_t x) {
    x += 0x9e3779b97f4a7c15;
    x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
    x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
    return x ^ (x >> 31);
  }
  size_t operator()(uint64_t x) const {
    static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
    return splitmix64(x + FIXED_RANDOM);
  }
};
template<typename K, typename V> using umap = unordered_map<K, V, custom_hash>;
template<typename K, typename V> using umultimap = unordered_multimap<K, V, custom_hash>;
template<typename T> using uset = unordered_set<T, custom_hash>;
template<typename T> using umultiset = unordered_multiset<T, custom_hash>;

void open(const string& s) {
  string a = s + ".in";
  string b = s + ".out";
  freopen(a.c_str(), "r", stdin);
  freopen(b.c_str(), "w", stdout);
}
template<typename A, typename B> ostream& operator<<(ostream &out, pair<A, B> const &pair);
template<typename T> ostream& operator<<(ostream &out, uset<T> const &s);
template<typename T> ostream& operator<<(ostream &out, set<T> const &s);
template<typename T> ostream& operator<<(ostream &out, multiset<T> const &s);
template<typename T> ostream& operator<<(ostream &out, umultiset<T> const &s);
template<typename K, typename V> ostream& operator<<(ostream &out, multimap<K, V> const &m);
template<typename K, typename V> ostream& operator<<(ostream &out, umultimap<K, V> const &m);
template<typename T> ostream& operator<<(ostream &out, vector<T> const &v);
template<typename K, typename V> ostream& operator<<(ostream &out, map<K, V> const &m);
template<typename K, typename V> ostream& operator<<(ostream &out, umap<K, V> const &m);
template<typename A, typename B> ostream& operator<<(ostream &out, pair<A, B> const &pair) {
  out << "(" << pair.first << ", " << pair.second;
  return out << ")";
}
template<typename T> ostream& operator<<(ostream &out, uset<T> const &s) {
  out << "["; int c = 0;
  for (T i : s) {if (c) out << ", "; out << i; c++;}
  return out << "]";
}
template<typename T> ostream& operator<<(ostream &out, set<T> const &s) {
  out << "["; int c = 0;
  for (T i : s) {if (c) out << ", "; out << i; c++;}
  return out << "]";
}
template<typename T> ostream& operator<<(ostream &out, vector<T> const &v) {
  out << "[";
  for (int i = 0; i < v.size(); i++) {if (i) out << ", "; out << v[i];}
  return out << "]";
}
template<typename K, typename V> ostream& operator<<(ostream &out, map<K, V> const &m) {
  out << "{"; int c = 0;
  for (const auto &pair : m) {if (c) out << ", "; out << pair.first << "=" << pair.second; c++;}
  return out << "}";
}
template<typename K, typename V> ostream& operator<<(ostream &out, umap<K, V> const &m) {
  out << "{"; int c = 0;
  for (const auto &pair : m) {if (c) out << ", "; out << pair.first << "=" << pair.second; c++;}
  return out << "}";
}
template<typename T> ostream& operator<<(ostream &out, multiset<T> const &s) {
  out << "["; int c = 0;
  for (T i : s) {if (c) out << ", "; out << i; c++;}
  return out << "]";
}
template<typename T> ostream& operator<<(ostream &out, umultiset<T> const &s) {
  out << "["; int c = 0;
  for (T i : s) {if (c) out << ", "; out << i; c++;}
  return out << "]";
}
template<typename K, typename V> ostream& operator<<(ostream &out, multimap<K, V> const &m) {
  out << "{"; int c = 0;
  for (const auto &pair : m) {if (c) out << ", "; out << pair.first << "=" << pair.second; c++;}
  return out << "}";
}
template<typename K, typename V> ostream& operator<<(ostream &out, umultimap<K, V> const &m) {
  out << "{"; int c = 0;
  for (const auto &pair : m) {if (c) out << ", "; out << pair.first << "=" << pair.second; c++;}
  return out << "}";
}
template<typename T> void next_vec(vector<T> &vec, int l) {
  vec = vector<T>(l);
  for (int i = 0; i < l; i++) cin >> vec[i];
}
template<typename A, typename B> void next_vec(vector<pair<A, B>> &vec, int l) {
  vec = vector<pair<A, B>>(l);
  for (int i = 0; i < l; i++) {
    A a; B b; cin >> a >> b;
    vec[i].first = a; vec[i].second = b;
  }
}
template<typename T> void next_graph(vector<vector<T>> &adj, int l) {
  adj = vector<vector<int>>(l);
  for (int i = 0; i < l; i++) {
    int a, b; cin >> a >> b;
    a--; b--;
    adj[a].pb(b);
    adj[b].pb(a);
  }
}
string join(vector<string> &vec, string &t) {
  int l = vec.size();
  string s;
  for (int i = 0; i < l; i++) {
    s += vec[i];
    if (i != l-1) s += t;
  }
  return s;
}
ll combo(ll n, ll d) {
  if (d > n) return 0;
  if (d*2 > n) d = n-d;
  if (d == 0) return 1;
  ll res = n;
  for (ll i = 2; i <= d; i++) {
    res *= (n-i+1);
    res /= i;
  }
  return res;
}
template<typename T> void shuffle_vec(vector<T> &vec) {
  shuffle(vec.begin(), vec.end(), mt19937(random_device()()));
}
ll gcd(ll a, ll b) {return b == 0 ? a : gcd(b, a%b);}
ll lcm(ll a, ll b) {return a/gcd(a, b)*b;}
vector<string> split(const string& str, const string& delim = " ") {
  vector<string> tokens;
  size_t prev = 0, pos = 0;
  do {
    pos = str.find(delim, prev);
    if (pos == string::npos) pos = str.length();
    string token = str.substr(prev, pos-prev);
    if (!token.empty()) tokens.push_back(token);
    prev = pos + delim.length();
  }
  while (pos < str.length() && prev < str.length());
  return tokens;
}
ll pow(ll a, ll b) {
  ll c = 1;
  for (ll i = 0; i < b; i++) c *= a;
  return c;
}
template<typename T> int binary_search(vector<T> &vec, T &n) {
  int l = vec.size();
  int left = 0;
  int right = l-1;
  while (left != right) {
    int mid = (left+right+1)/2;
    if (vec[mid] > n) right = mid-1;
    else left = mid;
  }
  return vec[left] == n ? left : -1;
}
template<typename T> vector<ll> prefix(vector<T> &vec) {
  int l = vec.size(); assert(l);
  vector<ll> pre(l); pre[0] = vec[0];
  for (int i = 1; i < l; i++) pre[i] = pre[i-1]+vec[i];
  return pre;
}
template<typename T> vector<ll> suffix(vector<T> &vec) {
  int l = vec.size();
  assert(l);
  vector<ll> suf(l);
  suf[l-1] = vec[l-1];
  for (int i = l - 2; i >= 0; i--) suf[i] = suf[i+1] + vec[i];
  return suf;
}
ll bs_lowest(const function<bool(ll)> &f, ll lo, ll hi) {
  while (lo < hi) {
    ll mid = (lo+hi)/2;
    f(mid) ? hi = mid : lo = mid+1;
  }
  return lo;
}
ll bs_highest(const function<bool(ll)> &f, ll lo, ll hi) {

  ll a = lo;
  for (ll i = hi; i >= a; i /= 2) {
    while (f(lo + i)) lo += i;
  }
  return lo;
}
template<typename T> T min(vector<T> &vec) {
  assert(!vec.empty());
  T a = vec[0];
  for (T &i : vec) a = min(a, i);
  return a;
}
template<typename T> T max(vector<T> &vec) {
  assert(!vec.empty());
  T a = vec[0];
  for (T &i : vec) a = max(a, i);
  return a;
}
template<typename T> ll sum(vector<T> &vec) {
  ll sum = 0;
  for (T &i : vec) sum += i;
  return sum;
}
vector<bool> sieve(int n) {
  vector<bool> vec(n+1, true);
  vec[0] = false;
  vec[1] = false;
  for (int i = 2; i <= n; i++) {
    if (vec[i]) {
      for (int j = i; j <= n; j += i) vec[i] = false;
    }
  }
  return vec;
}

void solve() {
	int l; cin >> l;
	string s; cin >> s;
	vector<int> vec(l);
	for (int i = 0; i < l; i++) vec[i] = s[i]-'0';
	if (vec[0] == 2 && vec[1] == 0 && vec[2] == 2 && vec[3] == 0) cout << "YES" << endl;
	else if (vec[0] == 2 && vec[1] == 0 && vec[2] == 2 && vec[l-1] == 0) cout << "YES" << endl;
	else if (vec[0] == 2 && vec[1] == 0 && vec[l-2] == 2 && vec[l-1] == 0) cout << "YES" << endl;
	else if (vec[0] == 2 && vec[l-3] == 0 && vec[l-2] == 2 && vec[l-1] == 0) cout << "YES" << endl;
	else if (vec[l-4] == 2 && vec[l-3] == 0 && vec[l-2] == 2 && vec[l-1] == 0) cout << "YES" << endl;
	else cout << "NO" << endl;
}

int main() {
  FAST_IO;
  //test_input;
  //test_local;
  //open("https://discord.gg/eE269UbRzA");
  test_cases;
}