Denis was very sad after Nastya rejected him. So he decided to walk through the gateways to have some fun. And luck smiled at him! When he entered the first courtyard, he met a strange man who was selling something. 

Denis bought a mysterious item and it was... Random permutation generator! Denis could not believed his luck.

When he arrived home, he began to study how his generator works and learned the algorithm. The process of generating a permutation consists of n steps. At the i-th step, a place is chosen for the number i (1 ≤ i ≤ n). The position for the number i is defined as follows:

  * For all j from 1 to n, we calculate r_j — the minimum index such that j ≤ r_j ≤ n, and the position r_j is not yet occupied in the permutation. If there are no such positions, then we assume that the value of r_j is not defined. 
  * For all t from 1 to n, we calculate count_t — the number of positions 1 ≤ j ≤ n such that r_j is defined and r_j = t. 
  * Consider the positions that are still not occupied by permutation and among those we consider the positions for which the value in the count array is maximum. 
  * The generator selects one of these positions for the number i. The generator can choose any position. 



Let's have a look at the operation of the algorithm in the following example:

<image>

Let n = 5 and the algorithm has already arranged the numbers 1, 2, 3 in the permutation. Consider how the generator will choose a position for the number 4:

  * The values of r will be r = [3, 3, 3, 4, ×], where × means an indefinite value. 
  * Then the count values will be count = [0, 0, 3, 1, 0]. 
  * There are only two unoccupied positions in the permutation: 3 and 4. The value in the count array for position 3 is 3, for position 4 it is 1. 
  * The maximum value is reached only for position 3, so the algorithm will uniquely select this position for number 4. 



Satisfied with his purchase, Denis went home. For several days without a break, he generated permutations. He believes that he can come up with random permutations no worse than a generator. After that, he wrote out the first permutation that came to mind p_1, p_2, …, p_n and decided to find out if it could be obtained as a result of the generator.

Unfortunately, this task was too difficult for him, and he asked you for help. It is necessary to define whether the written permutation could be obtained using the described algorithm if the generator always selects the position Denis needs.

Input

The first line contains a single integer t (1 ≤ t ≤ 10^5) — the number of test cases. Then the descriptions of the test cases follow.

The first line of the test case contains a single integer n (1 ≤ n ≤ 10^5) — the size of the permutation.

The second line of the test case contains n different integers p_1, p_2, …, p_n (1 ≤ p_i ≤ n) — the permutation written by Denis.

It is guaranteed that the sum of n over all test cases doesn't exceed 10^5.

Output

Print "Yes" if this permutation could be obtained as a result of the generator. Otherwise, print "No".

All letters can be displayed in any case.

Example

Input


5
5
2 3 4 5 1
1
1
3
1 3 2
4
4 2 3 1
5
1 5 2 4 3


Output


Yes
Yes
No
Yes
No

Note

Let's simulate the operation of the generator in the first test.

At the 1 step, r = [1, 2, 3, 4, 5], count = [1, 1, 1, 1, 1]. The maximum value is reached in any free position, so the generator can choose a random position from 1 to 5. In our example, it chose 5.

At the 2 step, r = [1, 2, 3, 4, ×], count = [1, 1, 1, 1, 0]. The maximum value is reached in positions from 1 to 4, so the generator can choose a random position among them. In our example, it chose 1.

At the 3 step, r = [2, 2, 3, 4, ×], count = [0, 2, 1, 1, 0]. The maximum value is 2 and is reached only at the 2 position, so the generator will choose this position.

At the 4 step, r = [3, 3, 3, 4, ×], count = [0, 0, 3, 1, 0]. The maximum value is 3 and is reached only at the 3 position, so the generator will choose this position.

At the 5 step, r = [4, 4, 4, 4, ×], count = [0, 0, 0, 4, 0]. The maximum value is 4 and is reached only at the 4 position, so the generator will choose this position.

In total, we got a permutation of 2, 3, 4, 5, 1, that is, a generator could generate it.
//package learning;
import java.util.*;
import java.io.*;
import java.lang.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class NitsLocal {
    static ArrayList<String> s1;
    static boolean[] prime;
    static int n = (int)1e7;
    
     static void sieve() {
Arrays.fill(prime	, true);
prime[0] = prime[1] = false;
for(int i = 2 ; i * i <= n ; ++i) {
if(prime[i]) {
for(int k = i * i; k<= n ; k+=i) {
prime[k] = false;
}
}
}
 
}
    public static void main(String[] args) {
        InputReader sc = new InputReader(System.in);
        n *= 2;
           prime  = new boolean[n + 1];
           //sieve();
                prime[1] = false;
              
                  
             /*    
        int n = sc.ni();
        int k = sc.ni();
        int []vis = new int[n+1];
        int []a = new int[k];
        for(int i=0;i<k;i++)
        {
            a[i] = i+1;
        }
        int j = k+1;
        int []b = new int[n+1];
        for(int i=1;i<=n;i++)
        {
            b[i] = -1;
        }
        int y = n - k +1;
        int tr = 0;
        int y1 = k+1;
        while(y-- > 0)
        {
        System.out.print("? ");
        for(int i=0;i<k;i++)
        {
            System.out.print(a[i] + " ");
        }
        
        System.out.flush();
        int pos = sc.ni();
        int a1 = sc.ni();
        b[pos] = a1;
        
        
        for(int i=0;i<k;i++)
        {
            if(a[i] == pos)
            {
                a[i] = y1;
                y1++;
            }
        }
        }
        ArrayList<Integer> a2 = new ArrayList<>();
        if(y >= k)
        {
            
        int c = 0;
        int k1 = 0;
            for(int i=1;i<=n;i++)
            {
                if(b[i] != -1)
                {
                    c++;
                    a[k1] = i;
                    a2.add(b[i]);
                    k1++;
                }
                if(c==k)
                    break;
            }
            
            Collections.sort(a2);
            System.out.print("? ");
        for(int i=0;i<k;i++)
        {
            System.out.print(a[i] + " ");
        }
        System.out.println();
        System.out.flush();
        int pos = sc.ni();
        int a1 = sc.ni();
        int ans = -1;
        for(int i=0;i<a2.size();i++)
        {
            if(a2.get(i) == a1)
            {
                ans = i+1;
                break;
            }
        }
        System.out.println("!" + " " + ans);
           System.out.flush();  
        }
        else
        {
            int k1 = 0;
            a = new int[k];
             for(int i=1;i<=n;i++)
            {
                if(b[i] != -1)
                {
                    
                    a[k1] = i;
                    a2.add(b[i]);
                    k1++;
                }
             
            }
              for(int i=1;i<=n;i++)
            {
                if(b[i] == -1)
                {
                    
                    a[k1] = i;
                    
                    k1++;
                    if(k1==k)
                        break;
                }
             
            }
              int ans = -1;
              while(true)
              {
                   System.out.print("? ");
                     for(int i=0;i<k;i++)
                   {
                         System.out.print(a[i] + " ");
                  }
                   System.out.println();
                   System.out.flush();
                   int pos = sc.ni();
                   int a1 = sc.ni();
                   int f = 0;
                   
                   if(b[pos] != -1)
                   {
                       Collections.sort(a2);
                       for(int i=0;i<a2.size();i++)
                       {
                           if(a2.get(i) == a1)
                           {
                               ans = i+1;
                               f = 1;
                               System.out.println("!" + " " + ans);
                               System.out.flush();
                               break;
                           }
                       }
                       if(f==1)
                           break;
                   }
                   else
                   {
                       b[pos] = a1;
                        a = new int[k];
                        a2.add(a1);
             for(int i=1;i<=n;i++)
            {
                if(b[i] != -1)
                {
                    
                    a[k1] = i;
                    a2.add(b[i]);
                    k1++;
                }
             
            }
              for(int i=1;i<=n;i++)
            {
                if(b[i] == -1)
                {
                    
                    a[k1] = i;
                    
                    k1++;
                    if(k1==k)
                        break;
                }
             
                       
                   }
              }
        }  
          */
             
 
    /*
          int n = sc.ni();
          int []a = sc.nia(n);
          int []b = sc.nia(n);
          Integer []d = new Integer[n];
          int []d1 = new int[n];
          for(int i=0;i<n;i++)
          {
              d[i] = (a[i] - b[i]);
             
          }
          int l = 0;
          int r = n-1;
          Arrays.sort(d);
          long res = 0;
          while(l < r)
          {
              if(d[l] + d[r] > 0)
              {
                  res += (long) (r-l);
                  r--;
              }
              else 
                  l++;
          }
          
          w.println(res);
*/
      /*
      int n = sc.ni();
     
      ArrayList<Integer> t1 = new ArrayList<>();
      int []p1 = new int[n+1];
      int []q1 = new int[n-1];
      int []q2 = new int[n-1];
      for(int i=0;i<n-1;i++)
      {
          int p = sc.ni();
          int q = sc.ni();
          t1.add(q);
          p1[p]++;
          q1[i] = p;
          q2[i] = q;
          
      }
      int res = 0;
      for(int i=0;i<t1.size();i++)
      {
          if(p1[t1.get(i)] == 0)
          {
              res = t1.get(i);
              //break;
          }
      }
      
    int y = 1;
    for(int i=0;i<n-1;i++)
    {
        if(q2[i] == res)
        {
            w.println("0");
        }
        else
        {
            w.println(y + " ");
            y++;
        }
    }
      */
 /*
   int n = sc.ni();
   int k = sc.ni();
   Integer []a = new Integer[n];
   for(int i=0;i<n;i++)
   {
       a[i] = sc.ni();
       a[i] = a[i]%k;
   }
   HashMap<Integer,Integer> hm = new HashMap<>();
   for(int i=0;i<n;i++)
   {
       if(!hm.containsKey(a[i]))
           hm.put(a[i], 1);
       else
           hm.put(a[i], hm.get(a[i]) + 1);
   }
  Arrays.sort(a);
  int z = 0;
  long res = 0;
  HashMap<Integer,Integer> v = new HashMap<>();
  for(int i=0;i<n;i++)
  {
      if(a[i] == 0)
          res++;
      else
      {
          if(a[i] == k-a[i] && !v.containsKey(a[i]))
          {
              res += (long) hm.get(a[i]) / 2;
              v.put(a[i],1);
          }
          else
          {
          if(hm.containsKey(a[i]) && hm.containsKey(k-a[i]))
          {
          int temp = a[i];
          
          if(!v.containsKey(a[i]) && !v.containsKey(k-a[i]))
          {
             res += (long) Math.min(hm.get(temp), hm.get(k-temp));
             v.put(temp,1);
             v.put(k-temp,1);
          }
          }
          }
      }
  }
  w.println(res);
*/
 /*
int []a = new int[4];
//G0
a[0] = 0;
a[1] = 1;
a[2] = 0;
a[3] = 1;
int []b = new int[4];
//g1
b[0] = 0;
b[1] = 1;
b[2] = 1;
b[3] = 0;
int [][]dp1 = new int[4][4];
int [][]dp2 = new int[4][4];
for(int i=0;i<4;i++)
{
    for(int j=0;j<4;j++)
    {
        dp1[i][j] = (a[i] | a[j]);
    }
   // w.println();
}
w.println();
for(int i=0;i<4;i++)
{
    for(int j=0;j<4;j++)
    {
        dp2[i][j] = (b[i] | b[j]);
    }
    //w.println();
}
int a1 = 0;
int b1 = 0;
int c1 = 0;
int d1 = 0;
for(int i=0;i<4;i++)
{
    for(int j=0;j<4;j++)
    {
        if(dp1[i][j] == 0 && dp2[i][j] == 0)
            a1++;
        else  if(dp1[i][j] == 1 && dp2[i][j] == 1)
            b1++;
        else  if(dp1[i][j] == 0 && dp2[i][j] == 1)
            c1++;
        else
            d1++;
       
    }
}
w.println(a1+ " " + b1 + " " + c1 +" "+ d1);

Scanner sc = new Scanner(System.in);
    int q = sc.nextInt();
    while(q-- > 0)
    {
        long x = sc.nextLong();
        long y = sc.nextLong();
        long a = (x - y)/2;  
        long a1 = 0, b1 = 0; 
        
        
        int lim     = 8; 
  
   
    int f = 0;
    
    for (int i=0; i<8*lim; i++)  
    {  
        long pi = (y & (1 << i));  
        long qi = (a & (1 << i));  
        if (pi == 0 && qi == 0)  
        {  
             
        }  
        else if (pi == 0 && qi > 0)  
        {  
            a1 = ((1 << i) | a1);  
            b1 = ((1 << i) | b1);  
        }  
        else if (pi > 0 && qi == 0)  
        {  
            a1 = ((1 << i) | a1);  
  
           
        }  
        else
        {  
            f = 1;  
            
        }  
    }  
    if(a1+b1 != x)
        f  =1;
  if(f==1)
            System.out.println("-1");
  else
  {
       if(a1 > b1)
       {
           long temp = a1;
           a1 = b1;
           b1 = temp;
       }
    System.out.println(a1 + " " + b1);
   
  }
  
  
    }
     
     */
 int t = sc.ni();
 while(t-- > 0)
 {
     int n = sc.ni();
     
     int []a = sc.nia(n);
     int []c = new int[n];
     int []p = new int[n+1];
     for(int i=0;i<n;i++)
     {
         p[a[i]] = i;
     }
     for(int i=0;i<n;i++)
     {
         c[i] = 1;
     }
     int st = p[1];
     c[st] = -1;
     int f = 0;
     for(int i=2;i<=n;i++)
     {
         if(st + 1 == n)
         {
             st = p[i];
             c[st] = -1;
             
         }
         else if(st+1 < n && c[st+1] == -1)
         {
             st = p[i];
             c[st] = -1;
             
         }
         else if(st+1 < n && p[i] != st+1)
         {
             f = 1;
             break;
         }
         else
         {
             st++;
             c[p[i]] = -1;
             //w.println("*");
         }
        
     }
     if(f==0)
         w.println("Yes");
     else
         w.println("No");
 }
   
 
 
 
       w.close();
       
        
    
    
} 
   
    public static long calc(int x,int y,int z)
    {
        long res = ((long) (x-y) * (long) (x-y)) + ((long) (z-y) * (long) (z-y)) + ((long) (x-z) * (long) (x-z));
        return res;
    }
    
    public static int upperBound(ArrayList<Integer>arr, int length, int value) {
        int low = 0;
        int high = length;
        while (low < high) {
            final int mid = (low + high) / 2;
            if (value >= arr.get(mid)) {
                low = mid + 1;
            } else {
                high = mid;
            }
        }
        return low;
    }
    
     public static int lowerBound(ArrayList<Integer> arr, int length, int value) {
        int low = 0;
        int high = length;
        while (low < high) {
            final int mid = (low + high) / 2;
            //checks if the value is less than middle element of the array
            if (value <= arr.get(mid)) {
                high = mid;
            } else {
                low = mid + 1;
            }
        }
        return low;
    }
    static HashMap<Long,Integer> map;
  
          
    static class Coin{
        long a;
        long b;
        
        Coin(long a, long b)
        {
            this.a = a;
            this.b = b;
           
        }
    }
    static ArrayList<Long> fac;
    static HashSet<Long> hs;
    public static void primeFactors(long n) 
    { 
        // Print the number of 2s that divide n 
        while (n % 2 == 0) { 
            fac.add(2l);
            hs.add(2l);
            n /= 2; 
        } 
  
        // n must be odd at this point.  So we can 
        // skip one element (Note i = i +2) 
        for (long i = 3; i*i <= n; i += 2) { 
            // While i divides n, print i and divide n 
            while (n % i == 0) { 
                fac.add(i);
                hs.add(i);
                n /= i; 
            } 
        } 
  
        // This condition is to handle the case whien 
        // n is a prime number greater than 2 
        if (n > 2) 
            fac.add(n);
    } 
   static int smallestDivisor(int n)  
{  
    // if divisible by 2  
    if (n % 2 == 0)  
        return 2;  
  
    // iterate from 3 to sqrt(n)  
    for (int i = 3; i * i <= n; i += 2) {  
        if (n % i == 0)  
            return i;  
    }  
  
    return n;  
}  
 static boolean IsP(String s,int l,int r)
 {
      while(l <= r)
      {
          if(s.charAt(l) != s.charAt(r))
          {
              return false;
          }
         l++;
         r--;
      }
      return true;
 }
  
	

    
    
 static class Student{
    int id;
    int val;
     Student(int id,int val)
     {
      this.id = id;
      this.val = val;
     }
 }
   
   
   
 
     static int upperBound(ArrayList<Integer> a, int low, int high, int element){
    while(low < high){
        int middle = low + (high - low)/2;
        if(a.get(middle) >= element)
            high = middle;
        else 
            low = middle + 1;
    }
    return low;
}
   static long func(long t,long e,long h,long a, long b)
   {
       if(e*a >= t)
           return t/a;
       else
       {
           return e + Math.min(h,(t-e*a)/b);
       }
   }
         
      
   
    public static int countSetBits(int number){
        int count = 0;
        while(number>0){
            ++count;
            number &= number-1;
        }
        return count;
    }
    
     
      
 
    
   
     static long modexp(long x,long n,long M)
{
    long power = n;
    long result=1;
    x = x%M;
    while(power>0)
    {
        if(power % 2 ==1)
            result=(result * x)%M;
        x=(x*x)%M;
        power = power/2;
    }
    return result;
}
      static long modInverse(long A,long M)
{
    return modexp(A,M-2,M);
}
    static long gcd(long a,long b)
    {
        if(a==0)
            return b;
        else
            return gcd(b%a,a);
    }
    static class Temp{
        int a;
        int b;
        int c;
        int d;
      
        Temp(int a,int b,int c,int d)
        {
            this.a = a;
            this.b = b;
            this.c  =c;
            this.d = d;
            //this.d = d;
        }
    }
   
    
    
   static long sum1(int t1,int t2,int x,int []t)
   {
       int mid = (t2-t1+1)/2;
  if(t1==t2)
      return 0;
    
   else
   return sum1(t1,mid-1,x,t) + sum1(mid,t2,x,t);
    
     
   }
  
   
    static String replace(String s,int a,int n)
    {
        char []c = s.toCharArray();
        for(int i=1;i<n;i+=2)
        {
            int num = (int) (c[i] - 48);
            num += a;
            num%=10;
            c[i] = (char) (num+48);
        }
        return new String(c);
    }
    static String move(String s,int h,int n)
    {
        h%=n;
        char []c = s.toCharArray();
        char []temp = new char[n];
        for(int i=0;i<n;i++)
        {
            temp[(i+h)%n] = c[i];
        }
        return new String(temp);
    }
    
     public static int ip(String s){
return Integer.parseInt(s);
}
     static class multipliers implements Comparator<Long>{
  
         
  public int compare(Long a,Long b) {
   if(a<b)
    return 1;
   else if(b<a)
    return -1;
   else
    return 0;
  }
 }
     
     static class multipliers1 implements Comparator<Coin>{
  
  public int compare(Coin a,Coin b) {
   if(a.a < b.a)
       return 1;
   else if(a.a > b.a)
       return -1;
   else{ 
       if(a.b < b.b)
       return 1;
   else if(a.b > b.b)
       return -1;
       else
       return 0;
   }
       
  
 
     }
     }
     
// Java program to generate power set in 
// lexicographic order. 
 
    
    
    
      static class InputReader {
 
private final InputStream stream;
private final byte[] buf = new byte[8192];
private int curChar, snumChars;
 
public InputReader(InputStream st) {
this.stream = st;
}
 
public int read() {
if (snumChars == -1)
throw new InputMismatchException();
if (curChar >= snumChars) {
curChar = 0;
try {
snumChars = stream.read(buf);
} catch (IOException e) {
throw new InputMismatchException();
}
if (snumChars <= 0)
return -1;
}
return buf[curChar++];
}
 
public int ni() {
int c = read();
while (isSpaceChar(c)) {
c = read();
}
int sgn = 1;
if (c == '-') {
sgn = -1;
c = read();
}
int res = 0;
do {
res *= 10;
res += c - '0';
c = read();
} while (!isSpaceChar(c));
return res * sgn;
}
 
public long nl() {
int c = read();
while (isSpaceChar(c)) {
c = read();
}
int sgn = 1;
if (c == '-') {
sgn = -1;
c = read();
}
long res = 0;
do {
res *= 10;
res += c - '0';
c = read();
} while (!isSpaceChar(c));
return res * sgn;
}
 
public int[] nia(int n) {
int a[] = new int[n];
for (int i = 0; i < n; i++) {
a[i] = ni();
}
return a;
}
 
public String rs() {
int c = read();
while (isSpaceChar(c)) {
c = read();
}
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = read();
} while (!isSpaceChar(c));
return res.toString();
}
 
public String nextLine() {
int c = read();
while (isSpaceChar(c))
c = read();
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = read();
} while (!isEndOfLine(c));
return res.toString();
}
 
public boolean isSpaceChar(int c) {
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
 
private boolean isEndOfLine(int c) {
return c == '\n' || c == '\r' || c == -1;
}
 
}
 
 
 
 
 
   
static PrintWriter w = new PrintWriter(System.out);
                  static class Student1
    {
        int id;
        //int x;
       
       int b;
      
        //long z;
        
        Student1(int id,int b)
        {
            this.id = id;
            //this.x = x;
            //this.s = s;
            this.b = b;
          
           // this.z = z;
            
            
            
           
        }
        
    }
}