There are n districts in the town, the i-th district belongs to the a_i-th bandit gang. Initially, no districts are connected to each other.

You are the mayor of the city and want to build n-1 two-way roads to connect all districts (two districts can be connected directly or through other connected districts).

If two districts belonging to the same gang are connected directly with a road, this gang will revolt.

You don't want this so your task is to build n-1 two-way roads in such a way that all districts are reachable from each other (possibly, using intermediate districts) and each pair of directly connected districts belong to different gangs, or determine that it is impossible to build n-1 roads to satisfy all the conditions.

You have to answer t independent test cases.

Input

The first line of the input contains one integer t (1 ≤ t ≤ 500) — the number of test cases. Then t test cases follow.

The first line of the test case contains one integer n (2 ≤ n ≤ 5000) — the number of districts. The second line of the test case contains n integers a_1, a_2, …, a_n (1 ≤ a_i ≤ 10^9), where a_i is the gang the i-th district belongs to.

It is guaranteed that the sum of n does not exceed 5000 (∑ n ≤ 5000).

Output

For each test case, print:

  * NO on the only line if it is impossible to connect all districts satisfying the conditions from the problem statement. 
  * YES on the first line and n-1 roads on the next n-1 lines. Each road should be presented as a pair of integers x_i and y_i (1 ≤ x_i, y_i ≤ n; x_i ≠ y_i), where x_i and y_i are two districts the i-th road connects. 



For each road i, the condition a[x_i] ≠ a[y_i] should be satisfied. Also, all districts should be reachable from each other (possibly, using intermediate districts).

Example

Input


4
5
1 2 2 1 3
3
1 1 1
4
1 1000 101 1000
4
1 2 3 4


Output


YES
1 3
3 5
5 4
1 2
NO
YES
1 2
2 3
3 4
YES
1 2
1 3
1 4

import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Set;
import java.util.Stack;
import java.util.StringTokenizer;


public class N677 {
	static PrintWriter out;
	static Scanner sc;
	static ArrayList<Integer>q,w;
	static ArrayList<Integer>adj[];
	static HashSet<Integer>primesH;
	static boolean prime[];
	//static ArrayList<Integer>a;
	static HashSet<Long>h,tmp;
	static boolean[]v;
	static int[]a,b,c,d;
	static long[]l,dp;
	static char[][]mp;
	static int A,B,n;
	public static void main(String[]args) throws IOException {
		sc=new Scanner(System.in);
		out=new PrintWriter(System.out);
		//A();
		//B();
	//	C();
		D();
		//E():
		//minimum for subarrays of fixed length
		//F();
		out.close();
	}
	  private static void A() throws IOException {
		  int t=ni();
			while(t-->0) {
				
				int x=sc.nextInt();
				int num=10;
				int ans=0,cnt=0,dig=x%10;
				while(x!=0) {
					cnt++;
					x/=10;
				}
				out.println((dig-1)*num + cnt*(cnt+1)/2);
			}
		
	   }
		static void B() throws IOException {
			int t=ni();
			while(t-->0) {
				int n=sc.nextInt();
				a=nai(n);
			//	boolean zero=false,cont=true,one=false;
				Point[]occ=new Point[n];
				int k=0;
				for(int i=0;i<n;i++) {
					int cnto=0,cntz=0;
					while(i<n&&a[i]==1) {
						cnto++;
						i++;
					}
					if(cnto>0) {
						occ[k++]=new Point(1,cnto);
					}
					while(i<n&&a[i]==0) {
						i++;
						cntz++;
					}
					if(cntz>0) {
						occ[k++]=new Point(0,cntz);
					}
					
				
				}
				int nn=0;
				for(int j=0;j<n;j++) {
					if(occ[j]==null)break;
					if(occ[j].x==1)nn++;
				}
				if(nn<=1)out.println(0);
				else{
					int ans=0;
					int i=0;
					if(occ[i].x==0)i++;
					for(;i<n;i++) {
						if(occ[i]==null)break;
						if(i==n-1&&occ[i].y==0)
						if(occ[i].x==0)ans+=occ[i].y;
						
					}
					out.println(ans);
						
				}
						
			}
		}
	  static void C() throws IOException {
		  int t=ni();
		  while(t-->0) {
			  int n=ni();
			  a=nai(n);
			  int max=0,idx=-1;
			  boolean all=true;
			  for(int i=0;i<n-1;i++) {
				  if(a[i]!=a[i+1])all=false;
				 // max=Math.max(max, a[i]);
				  if(a[i]>max&&(a[i]>a[i+1]||(i>0&&a[i]>a[i-1]))) {
					  max=a[i];
					  idx=i;
				  }
			  }
			  if(a[n-1]>max&&a[n-1]>a[n-2]) {
				  max=a[n-1];
				  idx=n-1;
			  }
			  if(max==0) {
				  out.println(-1);
			  }else {
				  out.println(idx+1);
			  }
		  }
		  
		}



	static void D() throws IOException {
		int t=ni();
		while(t-->0) {
			int n=sc.nextInt();
			a=nai(n);
			boolean same=true;
			for(int i=0;i<n-1;i++) {
				if(a[i]!=a[i+1]) {
					same=false;break;
				}
			}
			if(same)out.println("NO");
			else {
				Hashtable<Integer,Integer>fr=new Hashtable<Integer,Integer>();
				
				for(int i=0;i<n;i++) {
					int x=a[i];
					if(fr.containsKey(x)) {
						int occ=fr.get(x);
						occ++;
						fr.remove(x);
						fr.put(x, occ);
					}else {
						fr.put(x, 1);
					}
				}
				Set<Integer>keys=fr.keySet();
				int min=Integer.MAX_VALUE,minOcc=Integer.MAX_VALUE,minidx;
				for(int key:keys) {
					int occ=fr.get(key);
					if(occ<minOcc) {
						minOcc=occ;
						min=key;
					}
				}
				Queue<Integer>q=new LinkedList<Integer>();
				for(int i=0;i<n;i++) {
					if(a[i]==min) {q.add(i);
					}
				}
//				if(q.isEmpty()) {
//					out.println("NO");
//					continue;
//				}
				minidx=q.remove();
				out.println("YES");
				for(int i=0;i<n;i++) {
					if(a[i]==min)continue;
					out.println((minidx+1)+" "+(i+1));
				}
				for(int i=0;i<n;i++) {
					if(a[i]==min)continue;
					if(q.isEmpty())break;
					out.println((i+1)+" "+(q.remove()+1));
				}
				
			}
		}
		
	}
	static int gcd (int a, int b) {
	    return b==0?a:gcd (b, a % b);
	}
	static int lcm (int a, int b) {
	    return a / gcd(a, b) * b;
	}
	static void E() throws IOException {
		int t=ni();
		while(t-->0) {

			int n=ni();
			
		}
		
		
		
	}
	static void F() throws IOException{
		int t=ni();
		while(t-->0) {

			int n=ni();
			
		}
		
	}
	static void G() throws IOException{
		int t=ni();
		while(t-->0) {

			int n=ni();
			
		}
		
	}
	private static void disp(int[] revl) {
		for(int i=0;i<revl.length;i++) {
			out.print(revl[i]+" ");
		}
		out.println();
	}
	static class Pair implements Comparable<Pair>{
		int a,b,A,B;
		Pair(int a,int b,int A,int B){
			this.a=a;
			this.b=b;
			this.A=A;
			this.B=B;
		}
		@Override
		public int compareTo(Pair p) {
			int times1=(int)Math.ceil(b/(double)A);
			int ded1=a*times1;
			int x1=ded1-a;
			int times2=(int)Math.ceil(p.b/(double)A);
			int ded2=p.a*times2;
			int x2=ded2-p.a;
//			if(b%A==0)return 1;
//			if(p.b%A==0)return -1;
			return p.a==a?b-p.b:a-p.a;
//			return a-p.a;
//			return b-p.b;
		}
		public String toString() {
			return "("+a+" "+b+")";
		}
	}
	static int ni() throws IOException {
		return sc.nextInt();
	}
	static double nd() throws IOException {
		return sc.nextDouble();
	}
	static long nl() throws IOException {
		return  sc.nextLong();
	}
	static String ns() throws IOException {
		return sc.next();
	}
	static int[] nai(int n) throws IOException {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = sc.nextInt();
		return a;
	}
	static long[] nal(int n) throws IOException {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = sc.nextLong();
		return a;
	}
	static int[][] nmi(int n,int m) throws IOException{
		int[][]a=new int[n][m];
		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++) {
				a[i][j]=sc.nextInt();
			}
		}
		return a;
	}

	static long[][] nml(int n,int m) throws IOException{
		long[][]a=new long[n][m];
		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++) {
				a[i][j]=sc.nextLong();
			}
		}
		return a;
	}
	static void o(String x) {
		out.print(x);
	}
	static void ol(String x) {
		out.println(x);
	}
	static void ol(int x) {
		out.println(x);
	}
	static void disp1(int []a) {
		for(int i=0;i<a.length;i++) {
			out.print(a[i]+" ");
		}
		out.println();
	}
	static void disp2(Pair []a) {
		for(int i=0;i<a.length;i++) {
			out.print(a[i]+" ");
		}
		out.println();
	}
	static class Scanner 
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException 
		{
			while (st == null || !st.hasMoreTokens()) 
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
		public boolean hasNext() {return st.hasMoreTokens();}
		public int nextInt() throws IOException {return Integer.parseInt(next());}
		
		public double nextDouble() throws IOException {return Double.parseDouble(next());}
		
		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}
			
		public boolean ready() throws IOException {return br.ready(); }
		

	}
}
