You're given an array a_1, …, a_n of n non-negative integers.

Let's call it sharpened if and only if there exists an integer 1 ≤ k ≤ n such that a_1 < a_2 < … < a_k and a_k > a_{k+1} > … > a_n. In particular, any strictly increasing or strictly decreasing array is sharpened. For example:

  * The arrays [4], [0, 1], [12, 10, 8] and [3, 11, 15, 9, 7, 4] are sharpened; 
  * The arrays [2, 8, 2, 8, 6, 5], [0, 1, 1, 0] and [2, 5, 6, 9, 8, 8] are not sharpened. 



You can do the following operation as many times as you want: choose any strictly positive element of the array, and decrease it by one. Formally, you can choose any i (1 ≤ i ≤ n) such that a_i>0 and assign a_i := a_i - 1.

Tell if it's possible to make the given array sharpened using some number (possibly zero) of these operations.

Input

The input consists of multiple test cases. The first line contains a single integer t (1 ≤ t ≤ 15\ 000) — the number of test cases. The description of the test cases follows.

The first line of each test case contains a single integer n (1 ≤ n ≤ 3 ⋅ 10^5).

The second line of each test case contains a sequence of n non-negative integers a_1, …, a_n (0 ≤ a_i ≤ 10^9).

It is guaranteed that the sum of n over all test cases does not exceed 3 ⋅ 10^5.

Output

For each test case, output a single line containing "Yes" (without quotes) if it's possible to make the given array sharpened using the described operations, or "No" (without quotes) otherwise.

Example

Input


10
1
248618
3
12 10 8
6
100 11 15 9 7 8
4
0 1 1 0
2
0 0
2
0 1
2
1 0
2
1 1
3
0 1 0
3
1 0 1


Output


Yes
Yes
Yes
No
No
Yes
Yes
Yes
Yes
No

Note

In the first and the second test case of the first test, the given array is already sharpened.

In the third test case of the first test, we can transform the array into [3, 11, 15, 9, 7, 4] (decrease the first element 97 times and decrease the last element 4 times). It is sharpened because 3 < 11 < 15 and 15 > 9 > 7 > 4.

In the fourth test case of the first test, it's impossible to make the given array sharpened.


/*
   AUTHOR 
    
    Mr. PANKAJ GOYAL 
    Coding Lover 
                     */
#include<bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<pii> vpii;
typedef unordered_map<int,int> umii;
typedef unordered_map<ll, ll> umll;
typedef map<int,int> mii;
typedef map<ll,ll> mll;

#define      unsigned long long int ull
#define      fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define      F first
#define      S second
#define      f(i,n) for (int i = 0; i < n; i++)
#define      fr(i,n) for(int i=(int)n-1;i>=0;--i)
#define      fo(i,a,n) for(ll i=(ll)a;i<(ll)n;i++)
#define      pb push_back
#define      mp make_pair
#define      pri_que_down priority_queue<ll>
#define      pri_que_up  priority_queue<ll, vector<ll>, greater<ll> >
#define      fix(x) fixed<<setprecision(x)


#define      display(v) for(int i =0;i<(int)v.size();++i)cout << v[i] << " "
#define      all(v) v.begin(),v.end()
#define      read(a) for(int i = 0;i<(int)a.size();++i)cin>>a[i]
#define       inf  4e18;


const int mod = 1e9 + 7;
const double PI = 3.1415926535897932384626;

const int nax = 300*1000 + 10;
int fac[nax];
int mod_inv[nax];


inline int add(int a, int b){ int c = (a%mod) + (b%mod); if(c >= mod) c -= mod; return c; }
inline int mul(int a, int b){ return ((a%mod) * 1ll * (b%mod)) % mod; }
inline int sub(int a, int b){ int c = (a%mod) - (b%mod); if(c < 0) c += mod; return c; }
inline string ans(bool a) { if(a) return "YES\n"; else return "NO\n";}
// ---------------------------------------*******************--------------------------------------//

ll power(ll x,ll y) 
{ 
    ll p=mod;
    ll res = 1;
    x=x%p;  
    while(y>0) 
    { 
        if (y&1) res=(res*x)%p;
        y=y>>1; 
        x=(x*x)%p; 
    } 
    return res; 
} 
void pre(){
    fac[0] = fac[1] = 1;
    for(int i = 2;i<nax;++i){
        fac[i] = mul(i , fac[i-1]);
    } 
    mod_inv[0] = mod_inv[1] = 1;
    for(int i =2;i<nax;++i){
        mod_inv[i] = power(fac[i] , mod - 2);
    }
 
}
ll ncr(ll n, ll r)
{
    if(r > n)return 0LL;
    int ans = mul(fac[n] , mod_inv[r]);
    ans = mul(ans , mod_inv[n-r]);
    return ans;
}

ll str_to_int(string s)
{
    stringstream geek(s); 
    ll x=0; 
    geek>>x; 
    return x;
}
string int_to_str(ll n)
{
    return to_string(n);
}


ll HCF_of_vl(vl &A)
{
    ll i,a,n=A.size();
    a=A[0];
     fo(i,1,n)
    a=__gcd(a,A[i]);
    return a;
}

ll LCM_of_vl(vl &A)
{
    ll i,a,b,n=A.size();
    a=A[0];b=A[0];
    fo(i,1,n)
    {
       b=__gcd(a,A[i]);
       a=(a*A[i])/b;
     }
     return a;
}


map<ll,ll> count_freq_vl(vl &A)
{
    map<ll,ll>result;
    ll i,n=A.size();
    f(i,n)
    result[A[i]]++;
    return result;
}


void factorize(ll n) 
{ 
	ll i,count = 0; 
	while (!(n % 2)) { 
		n >>= 1; 
		count++; 
	} 
	if (count)  cout<<"2 : "<<count<<"\n";
	for (i=3; i<=sqrt(n);i+= 2) { 
		count=0; 
		while(n%i == 0){ 
			count++; 
			n=n/i; 
		} 
		if (count) 
		cout<<i<<" : "<<count<<"\n";
	} 
	if (n>2) 
	cout<<n<<" : 1"<<"\n";
} 
void Prime(ll n)
{
    bool prime[n+1];
    memset(prime, true, sizeof(prime));
    for (int p=2; p*p<=n; p++)
    {
        if (prime[p] == true)
        {
            for (int i=p*p; i<=n; i += p)
                prime[i] = false;
        }
    }
    for (int p=2; p<=n; p++)
       if (prime[p])
          cout << p << " ";
}
vl count_bits_vl(vl &v)
{
    ll i,j;
     vl counts(31,0);
    for(i=0;i<31;i++)
    {
        for(j=0;j<v.size();j++) if((1ll<<i)&v[j]) counts[i]++;
    }
    return counts;
}
vl make_fact_vl(ll n)
{
     vl fact; fact.pb(1);
    for(ll i=1;i<=n;i++) fact.pb((i*fact[i-1])%mod);
    return fact;
}
void fib(ll n)
{
    vl f;
    f.pb(1);f.pb(1);f.pb(2);
    for(ll i=3; i<n; i++)
     f.pb((f[i-1]%mod+f[i-2]%mod)%mod);
}
ll mod_inverse(ll n)
{
    return power(n,mod-2);
}
 
/* ---------------------------------------*******************--------------------------------------
                                ll power(ll a,ll b)ll fact(ll n)    
                                ll ncr(ll fact[],ll n, ll r)
                                ll str_to_int(string s)
                                string int_to_str(ll n)
                                ll HCF_of_vl(vl &A)
                                ll LCM_of_vl(vl &A)
                                map<ll,ll> count_freq_vl(vl &A)
                                void factorize(ll n)
                                void Prime(int n)
                                vl count_bits_vl(vl &v)
                                vl make_fact_vl(ll n)
                                void fib(ll n)
                                ll mod_inverse(ull n, ull p)
 *****----------------------------------*******************--------------------------------------*/

void testcase()
{   
    ll n,i,j,a=0,b=0,c=0;
    cin>>n;
    vl v(n); read(v);
    if(n>1 && v[0]==v[1] && v[0]) v[0]=v[1]-1;
    for(i=1;i<n;i++)
    {
        if(a==0)
        {
            if(v[i]<v[i-1])   a=1;
            else if(v[i]==v[i-1])
            {
                v[i]--;a=1;
            }
        }
        else if(a==1)
        {
            if(v[i]>=v[i-1])
            {
                v[i]=v[i-1]-1;
                if(v[i]<0){
                c=-1;break;}
            }
        }
        if(v[i]==v[i-1])
        {
            c=-1;break;
        }
    }
    cout<<ans(c!=-1);
}
 


// ---------------------------------------*******************--------------------------------------//

void solve()
{
     ll t=1;
     cin>>t;
      while(t--)
      {
          testcase();
      }
}

signed main()
{
    clock_t begin = clock(); fast;
    
    #ifndef ONLINE_JUDGE
          freopen("in.txt","r",stdin);
          freopen("out.txt","w",stdout);
    #endif
  //  pre();
    solve();
    
    #ifndef ONLINE_JUDGE
        clock_t end = clock();
        cout<<"\n\nExecuted in : "<<double(end-begin)/CLOCKS_PER_SEC*1000<<"ms\n";
    #endif
    return 0;
}












