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.
import java.awt.*;
import java.io.*;
import java.lang.reflect.Array;
import java.util.StringTokenizer;
import java.util.*;

public class Solution {
    private static final long mod = 1000000007;
    static short dp[][];
    static HashMap<Integer,ArrayList<Integer>> map ;
    static HashMap<Integer,String> hm;
    static int n;

    public static void main(String args[]) throws Exception {

        FastScanner sc = new FastScanner();

        int t;
        t = sc.nextInt();
        PrintWriter out = new PrintWriter(System.out);

        while (t-- > 0) {
            solve(sc, out);
        }
        out.close();


    }

    public static void solve(FastScanner sc, PrintWriter out) {
       int n = sc.nextInt();
       ArrayList<Integer> al = new ArrayList<>();
       HashMap<Integer,Integer> hm = new HashMap<>();
       for(int i = 0;i<n;i++)
           hm.put(sc.nextInt(),i+1);


       int p = hm.get(1);
        int limit = n;
       int x = p -1;
       boolean check = true;
       for(int i =2;i<=n;i++){
           p = p + 1;
                if (p > limit)
                {
                p = hm.get(i);
                limit = x ;
                x = p - 1;
                continue;
               }
           if(hm.get(i) != p){
               check =false;
           }
       }
       if(check)
           out.println("YES");
       else
           out.println("NO");
        out.flush();

    }

    public static boolean recurse(ArrayList<Integer> ans, int i, int k, ArrayList<String> in){
    if (i == n) {
      if (k == 0) return true;
      return false;
          }
        if(k < 0) return false;

        if(dp[i][k] != 0) return dp[i][k] == 1? true: false;

        int valid = -1;
        String input = in.get(i);
        ArrayList<Pair> p = getNumbers(input);
        boolean check = false;
        for(Pair element : p){
            if(recurse(ans,i+1,k-element.y,in)){
                valid = Math.max(valid, element.x);
                check = true;
                break;
            }
        }


        if(check){ dp[i][k] = 1;ans.add(valid);}
        else dp[i][k] = 2;
        return check;

    }

    public static ArrayList<Pair> getNumbers(String a){
        ArrayList<Pair> ans = new ArrayList<>();


        for (int i = 9; i >=0; i--) {
            int count = 0;
            boolean check = true;
            String b = hm.get(i);
            for (int j = 0; j < a.length(); j++) {
                if (a.charAt(j) == '1' && b.charAt(j) != '1') {check = false; break;}
                if (a.charAt(j) == '0' && b.charAt(j) == '1') count++;
            }

        if (check)
            ans.add(Pair.of(i,count));

        }

        return ans;
    }


    public static  <T> void clear(HashMap<Integer,ArrayList<T>> hm){
        for(int key : hm.keySet())
            hm.put(key, new ArrayList<>());
    }

    public static  <T> void fill(HashMap<Integer,ArrayList<T>> hm, int m){
        for(int i = 1;i<=m;i++)
            hm.put(i, new ArrayList<>());
    }



    static long calcChanges(long[] a, long val, int n, long k){
        long ans = 0;
        for(int i = 1;i<=n/2;i++){
            long x = a[i];
            long y = a[n-i-1];
            if((k + x < val && k + y < val) || ( 1 + x > val && 1 + y > val)){
                ans = ans + 2;
            } else if(x + y != val) ans = ans + 1;
        }
        return ans;
    }


    public static class Pair{
        int x;

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (!(o instanceof Pair)) return false;
            Pair pair = (Pair) o;
            return x == pair.x &&
                    y == pair.y;
        }

        @Override
        public int hashCode() {
            return Objects.hash(x, y);
        }

        int y;
        public static Pair of(int x, int y){
            Pair p = new Pair();
            p.x = x;
            p.y = y;
            return p;
        }
    }



    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        public String next() {
            while (!st.hasMoreElements())
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int[] readArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

    }
}



class DFS{


    public void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int n  = sc.nextInt();
        Graph g = new Graph();
        for(int i = 1;i<=n;i++)
            g.addNode(i);

        int e = sc.nextInt();
        while(e-->0){
            int one = sc.nextInt();
            int two = sc.nextInt();
            g.addEdge(one, two);
            g.addEdge(two, one);
        }
        g.resetVisited();
        g.DFS(g.nodes.get(1));


    }
}


class Node{
    int label;
    long touristP;
    long sum;
    Node parent;
    boolean visited = false;
    Node(int l){
        label=l;
        sum = 0;
        touristP = 0;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Node)) return false;
        Node node = (Node) o;
        return label == node.label &&
                touristP == node.touristP &&
                sum == node.sum &&
                visited == node.visited;
    }

    @Override
    public int hashCode() {
        return Objects.hash(label);
    }
}

class Graph{

    HashMap<Node,ArrayList<Node>> hm = new HashMap<>();
    HashMap<Integer,Node> nodes = new HashMap<>();
    Graph(){

    }

    void addNode(int n){
        Node node= new Node(n);
        this.nodes.put(n,node);
    }

    void addEdge(int f,int t){
        Node from = nodes.get(f);
        Node to = nodes.get(t);
        if(!hm.containsKey(from))
            hm.put(from,new ArrayList<>());

        hm.get(from).add(to);
    }

    void resetVisited(){
        for(Node n : hm.keySet()){
            n.visited = false;
            for(Node nn:hm.get(n))
                nn.visited = false;
        }
    }

    void DFS(Node n){
        if(n.visited)
            return;

        n.visited = true;
        System.out.print(n.label + " ");
        if(hm.containsKey(n))
            for(Node an : hm.get(n))
                DFS(an);
    }


    long DFSSum(Node n){
        if(n.visited)
            return 0l;

        n.visited = true;
        if(hm.containsKey(n)) {
            for (Node an : hm.get(n)) {
                n.sum = n.sum + DFSSum(an);

            }
        }

        return n.sum+1;
    }

    void BFS(Node n){
        Queue<Node> q = new LinkedList<>();
        q.add(n);

        while(!q.isEmpty()){
            Node node = q.poll();

            System.out.print(node.label+" ");
            node.visited = true;

            if(!hm.containsKey(node))
                continue;

            for(Node nn: hm.get(node)){
                if(nn.visited == false)
                {
                    if(!nn.visited)
                        q.add(nn);
                }
            }
        }

    }
}
