**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Funny Game
time_limit_ms: 2000
memory_limit_mb: 256
Description: Vanya has a graph with $$$n$$$ vertices (numbered from $$$1$$$ to $$$n$$$) and an array $$$a$$$ of $$$n$$$ integers; initially, there are no edges in the graph. Vanya got bored, and to have fun, he decided to perform $$$n - 1$$$ operations.

Operation number $$$x$$$ (operations are numbered in order starting from $$$1$$$) is as follows:

- Choose $$$2$$$ different numbers $$$1 \leq u,v \leq n$$$, such that $$$|a_u - a_v|$$$ is divisible by $$$x$$$.
- Add an undirected edge between vertices $$$u$$$ and $$$v$$$ to the graph.

Help Vanya get a connected$$$^{\text{∗}}$$$ graph using the $$$n - 1$$$ operations, or determine that it is impossible.

Input: Each test consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \le t \le 10^{3}$$$) — the number of test cases. Then follows the description of the test cases.

The first line of each test case contains the number $$$n$$$ ($$$1 \leq n \leq 2000$$$) — the number of vertices in the graph.

The second line of each test case contains $$$n$$$ numbers $$$a_1, a_2, \cdots a_n$$$ ($$$1 \leq a_i \leq 10^9$$$).

It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2000$$$.

Output: For each test case, if there is no solution, then output "No" (without quotes).

Otherwise, output "Yes" (without quotes), and then output $$$n - 1$$$ lines, where in the $$$i$$$-th line, output the numbers $$$u$$$ and $$$v$$$ that need to be chosen for operation $$$i$$$.

You can output each letter in any case (for example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as a positive answer).

Examples:
input:
8
2
1 4
4
99 7 1 13
5
10 2 31 44 73
5
87 6 81 44 32
5
62 35 33 79 16
5
6 51 31 69 42
5
52 63 25 21 5
12
33 40 3 11 31 43 37 8 50 5 12 22
output:
YES
2 1
YES
4 1
2 1
3 2
YES
5 1
4 1
3 1
2 1
YES
4 1
3 1
2 1
5 4
YES
3 1
5 1
2 1
4 2
YES
4 1
5 1
2 1
3 2
YES
2 1
5 2
3 1
4 3
YES
9 1
12 9
11 1
10 1
6 1
7 6
2 1
8 2
5 2
3 1
4 1

Note: Let's consider the second test case.

- First operation $$$(x = 1)$$$: we can connect vertices $$$4$$$ and $$$1$$$, since $$$|a_4 - a_1| = |13 - 99| = |-86| = 86$$$, and $$$86$$$ is divisible by $$$1$$$.

- Second operation $$$(x = 2)$$$: we can connect vertices $$$2$$$ and $$$1$$$, since $$$|a_2 - a_1| = |7 - 99| = |-92| = 92$$$, and $$$92$$$ is divisible by $$$2$$$.

- Third operation $$$(x = 3)$$$: we can connect vertices $$$3$$$ and $$$2$$$, since $$$|a_3 - a_2| = |1 - 7| = |-6| = 6$$$, and $$$6$$$ is divisible by $$$3$$$.

Buggy Code:
#include <iostream>
#include<vector>
#include<algorithm>
#include<map>
#include<set>
#include<fstream>
#include<queue>
#include<stack>
#include<cmath>
using namespace std;
// q 4 5 % $

#define int long long
#define vii vector<int>
#define pb push_back
#define all(x) x.begin(),x.end()
#define pii pair<int,int>
const int mod=1e9+7;
#define forn(n) for(int i=0;i<n;i++)

int par[10000];
int sz[10000];

vector<int> facs(int num){
	vector<int> res;
	map<int,int>res2;
	res2[num]++;
	res2[1]++;
	for(int i=2;i*i<=num;i++){
		if(num%i==0){
			res2[i]++;
			res2[num/i]++;
		}
	}
	for(auto p:res2){
		res.pb(p.first);
	}
	return res;
}

int find_par(int u){
	if(par[u]==u){
		return u;
	}
	return par[u]=find_par(par[u]);
}

void merge(int u,int v){
	u=find_par(u);
	v=find_par(v);
	if(u==v){
		return;
	}
	if(sz[v]>sz[u]){
		swap(v,u);
	}
	sz[u]+=sz[v];
	par[v]=u;
}

void ini(int n){
	for(int i=0;i<=n;i++){
		par[i]=i;
		sz[i]=1;
	}
}

void solve(){
	int n;
	cin>>n;
	vii a(n);
	forn(n) cin>>a[i];
	//inputs above
	ini(n+2);
	vector<vector<pair<int,int>> > vecp(n+1);
	for(int i=0;i<n-1;i++){
		for(int j=i+1;j<n;j++){
			int t1=a[i];
			int t2=a[j];
			int diff=abs(t1-t2);
			vector<int> fcs=facs(diff);
			for(auto p:fcs){
				if(p<n)
				vecp[p].pb({i,j});
			}
		}
	}
	vector<int> vis(n+1,0);
	vector<pair<int,int> > ans;
	for(int i=n-1;i>0;i--){
		if(vecp[i].size()==0){
			cout<<"NO"<<endl;
			return;
		}
		for(auto p:vecp[i]){
			int u=p.first;
			int v=p.second;
			// cout<<"trying for... ";
			// cout<<i<<" "<<u<<" "<<v<<endl;
			int p1=find_par(u);
			int p2=find_par(v);
			if(p1==p2){
				// cout<<"called"<<endl;
				continue;
			}
			merge(u,v);
			ans.pb({u,v});
			// cout<<i<<" "<<u<<" "<<v<<endl;
			break;
		}
	}
	cout<<"YES"<<endl;
	reverse(all(ans));
	for(auto p:ans){
		cout<<p.first+1<<" "<<p.second+1<<endl;
	}

}

int32_t main() {
    int t;
    cin>>t;
    // t=1;
    while(t--){
        solve();
    }
    return 0;
}

**Instructions:**
- Focus on edge cases or scenarios that maximize the failure probability in faulty solutions.
- Due to the output length limit, you should generate a **small-scale** test input that is **complete and valid**.
- Output the test input directly, not code to generate it.

**Output format:**
```plaintext
{test input}
```

Think step by step.

Response:
To generate a challenging test input that exposes the bug in the provided buggy code, we need to focus on edge cases and scenarios that maximize the failure probability. Here are the steps to consider:

1. **Edge Cases**:
   - **Single Vertex**: A graph with only one vertex (n=1) should be trivially connected.
   - **Two Vertices**: A graph with two vertices (n=2) should be straightforward to connect if the difference between their values is divisible by 1.
   - **Multiple Vertices with Large Differences**: A graph with multiple vertices where the differences between values are large but divisible by the operation number.

2. **Scenarios**:
   - **All Values the Same**: If all values in the array are the same, any pair of vertices can be connected for any operation.
   - **Values with Small Differences**: Values that have small differences but are not always divisible by the operation number.
   - **Values with Large Differences**: Values that have large differences but are divisible by the operation number.

3. **Combining Scenarios**:
   - Create a test case with a mix of values that are designed to challenge the code's ability to find valid pairs for each operation.

Given these considerations, a small-scale test input that can expose potential issues in the code is:

```plaintext
3
1
5
2
1 2
5
1 2 3 4 5
```

Explanation:
1. **Single Vertex**:
   - `1 5`: This is a trivial case where the graph is already connected by default.

2. **Two Vertices**:
   - `2 1 2`: This is a straightforward case where the difference between the values is 1, which is divisible by 1. The graph can be connected with one edge.

3. **Multiple Vertices**:
   - `5 1 2 3 4 5`: This is a more challenging case. The differences between the values are small, and we need to ensure that the code can find valid pairs for each operation. For example:
     - Operation 1: Any pair (1, 2), (2, 3), (3, 4), (4, 5) can be used.
     - Operation 2: Pairs (1, 3), (2, 4), (3, 5) can be used.
     - Operation 3: Pairs (1, 4), (2, 5) can be used.
     - Operation 4: Pair (1, 5) can be used.

This test input should help identify any issues in the code's ability to handle different scenarios, especially when the differences between values are small and need to be divisible by the operation number.


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Funny Game
time_limit_ms: 2000
memory_limit_mb: 256
Description: Vanya has a graph with $$$n$$$ vertices (numbered from $$$1$$$ to $$$n$$$) and an array $$$a$$$ of $$$n$$$ integers; initially, there are no edges in the graph. Vanya got bored, and to have fun, he decided to perform $$$n - 1$$$ operations.

Operation number $$$x$$$ (operations are numbered in order starting from $$$1$$$) is as follows:

- Choose $$$2$$$ different numbers $$$1 \leq u,v \leq n$$$, such that $$$|a_u - a_v|$$$ is divisible by $$$x$$$.
- Add an undirected edge between vertices $$$u$$$ and $$$v$$$ to the graph.

Help Vanya get a connected$$$^{\text{∗}}$$$ graph using the $$$n - 1$$$ operations, or determine that it is impossible.

Input: Each test consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \le t \le 10^{3}$$$) — the number of test cases. Then follows the description of the test cases.

The first line of each test case contains the number $$$n$$$ ($$$1 \leq n \leq 2000$$$) — the number of vertices in the graph.

The second line of each test case contains $$$n$$$ numbers $$$a_1, a_2, \cdots a_n$$$ ($$$1 \leq a_i \leq 10^9$$$).

It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2000$$$.

Output: For each test case, if there is no solution, then output "No" (without quotes).

Otherwise, output "Yes" (without quotes), and then output $$$n - 1$$$ lines, where in the $$$i$$$-th line, output the numbers $$$u$$$ and $$$v$$$ that need to be chosen for operation $$$i$$$.

You can output each letter in any case (for example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as a positive answer).

Examples:
input:
8
2
1 4
4
99 7 1 13
5
10 2 31 44 73
5
87 6 81 44 32
5
62 35 33 79 16
5
6 51 31 69 42
5
52 63 25 21 5
12
33 40 3 11 31 43 37 8 50 5 12 22
output:
YES
2 1
YES
4 1
2 1
3 2
YES
5 1
4 1
3 1
2 1
YES
4 1
3 1
2 1
5 4
YES
3 1
5 1
2 1
4 2
YES
4 1
5 1
2 1
3 2
YES
2 1
5 2
3 1
4 3
YES
9 1
12 9
11 1
10 1
6 1
7 6
2 1
8 2
5 2
3 1
4 1

Note: Let's consider the second test case.

- First operation $$$(x = 1)$$$: we can connect vertices $$$4$$$ and $$$1$$$, since $$$|a_4 - a_1| = |13 - 99| = |-86| = 86$$$, and $$$86$$$ is divisible by $$$1$$$.

- Second operation $$$(x = 2)$$$: we can connect vertices $$$2$$$ and $$$1$$$, since $$$|a_2 - a_1| = |7 - 99| = |-92| = 92$$$, and $$$92$$$ is divisible by $$$2$$$.

- Third operation $$$(x = 3)$$$: we can connect vertices $$$3$$$ and $$$2$$$, since $$$|a_3 - a_2| = |1 - 7| = |-6| = 6$$$, and $$$6$$$ is divisible by $$$3$$$.

Buggy Code:
# D
class Dsu(object):
    def __init__(self,n):
        self.n = n
        self.parent = list(range(n))
    def find(self, x):
        f = self.parent[x]
        if x == f:
            return f
        self.parent[x] = self.find(f)
        return self.parent[x]
    def union(self,a,b):
        fa, fb = self.find(a), self.find(b)
        if fa < fb: ## 注意这里条件需要按实际修改
            self.parent[fb] = fa
        elif fb < fa:
            self.parent[fa] = fb
    def sets(self):
        m = {}
        for i in range(self.n):
            f = self.find(i)
            if f not in m:
                m[f] = []
            m[f].append(i)
        return m

def sol(arr,n):
    md = [{} for i in range(n)] # md[j][t] = list 以j为媒介，余数t的集合
    g = [{} for i in range(n)]  # g[j][a] = w # 以j为媒介，可以连接a的权重w
    for i,v in enumerate(arr):
        for j in range(1,n):
            t = v%j
            if t not in md[j]:
                md[j][t] = []
            md[j][t].append(i)
    #print(arr,n)
    for i,v in enumerate(arr):
        for j in range(1,n):
            t = v%j
            g[j][i] = len(md[j][t])
    #print(md)
    #print(g)

    res = []
    dsu = Dsu(n)
    for j in range(n-1,0,-1):
        for i,w in sorted(g[j].items(),key=lambda x:x[1]):
            t = arr[i]%j
            fa = dsu.find(i)
            for nx in md[j][t]:
                fb = dsu.find(nx)
                if fa != fb:
                    dsu.union(fa,fb)
                    res.append([i+1,nx+1])
                    #print('link',(i,nx),'=',(arr[i],arr[nx]),'mod',abs(arr[i]-arr[nx]),'j',j)
                    break
            else:
                continue
            break
    return res if len(res) == n-1 else []

t = int(input())
for _ in range(t):
    n = int(input())
    a = list(map(int, input().split()))
    res = sol(a,n)
    if len(res) == 0:
        print('NO')
    else:
        print('YES')
        for v in res[::-1]:
            print('{} {}'.format(v[0],v[1]))

**Instructions:**
- Focus on edge cases or scenarios that maximize the failure probability in faulty solutions.
- Due to the output length limit, you should generate a **small-scale** test input that is **complete and valid**.
- Output the test input directly, not code to generate it.

**Output format:**
```plaintext
{test input}
```

Think step by step.

Response:
```plaintext
1
5
1 2 3 4 5
```


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Funny Game
time_limit_ms: 2000
memory_limit_mb: 256
Description: Vanya has a graph with $$$n$$$ vertices (numbered from $$$1$$$ to $$$n$$$) and an array $$$a$$$ of $$$n$$$ integers; initially, there are no edges in the graph. Vanya got bored, and to have fun, he decided to perform $$$n - 1$$$ operations.

Operation number $$$x$$$ (operations are numbered in order starting from $$$1$$$) is as follows:

- Choose $$$2$$$ different numbers $$$1 \leq u,v \leq n$$$, such that $$$|a_u - a_v|$$$ is divisible by $$$x$$$.
- Add an undirected edge between vertices $$$u$$$ and $$$v$$$ to the graph.

Help Vanya get a connected$$$^{\text{∗}}$$$ graph using the $$$n - 1$$$ operations, or determine that it is impossible.

Input: Each test consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \le t \le 10^{3}$$$) — the number of test cases. Then follows the description of the test cases.

The first line of each test case contains the number $$$n$$$ ($$$1 \leq n \leq 2000$$$) — the number of vertices in the graph.

The second line of each test case contains $$$n$$$ numbers $$$a_1, a_2, \cdots a_n$$$ ($$$1 \leq a_i \leq 10^9$$$).

It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2000$$$.

Output: For each test case, if there is no solution, then output "No" (without quotes).

Otherwise, output "Yes" (without quotes), and then output $$$n - 1$$$ lines, where in the $$$i$$$-th line, output the numbers $$$u$$$ and $$$v$$$ that need to be chosen for operation $$$i$$$.

You can output each letter in any case (for example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as a positive answer).

Examples:
input:
8
2
1 4
4
99 7 1 13
5
10 2 31 44 73
5
87 6 81 44 32
5
62 35 33 79 16
5
6 51 31 69 42
5
52 63 25 21 5
12
33 40 3 11 31 43 37 8 50 5 12 22
output:
YES
2 1
YES
4 1
2 1
3 2
YES
5 1
4 1
3 1
2 1
YES
4 1
3 1
2 1
5 4
YES
3 1
5 1
2 1
4 2
YES
4 1
5 1
2 1
3 2
YES
2 1
5 2
3 1
4 3
YES
9 1
12 9
11 1
10 1
6 1
7 6
2 1
8 2
5 2
3 1
4 1

Note: Let's consider the second test case.

- First operation $$$(x = 1)$$$: we can connect vertices $$$4$$$ and $$$1$$$, since $$$|a_4 - a_1| = |13 - 99| = |-86| = 86$$$, and $$$86$$$ is divisible by $$$1$$$.

- Second operation $$$(x = 2)$$$: we can connect vertices $$$2$$$ and $$$1$$$, since $$$|a_2 - a_1| = |7 - 99| = |-92| = 92$$$, and $$$92$$$ is divisible by $$$2$$$.

- Third operation $$$(x = 3)$$$: we can connect vertices $$$3$$$ and $$$2$$$, since $$$|a_3 - a_2| = |1 - 7| = |-6| = 6$$$, and $$$6$$$ is divisible by $$$3$$$.

Buggy Code:
def li():return [int(i)for i in input().split()]
def find(x):
	while x!=father[x]:
		father[x]=father[father[x]]
		x=father[x]
	return x
def merge(x,y):
	x,y=find(x),find(y)
	father[y]=x

for _ in range(int(input())):
	n,=li()
	a=li()
	ans=[[]for i in range(n)]
	father=[i for i in range(n)]
	s=set()
	for x in range(n-1,0,-1):
		v=0
		l=[[]for i in range(x)]
		for i in range(n):
			ind=a[i]%x
			if l[ind] and ((l[ind][0] not in s) or (i not in s)):
				s.add(i)
				s.add(l[ind][0])
				ans[x]=[i+1,l[ind][0]+1]
				merge(l[ind][0],i)
				v=1
				break
			l[ind]+=[i]
		if not v:
			p=l[ind][0]

			for e in l[ind]:
				if find(e)!=find(p):
					merge(e,p)
					ans[x]=[e+1,p+1]
					break
	print("YES")
	for e in ans[1:]:print(*e)

**Instructions:**
- Focus on edge cases or scenarios that maximize the failure probability in faulty solutions.
- Due to the output length limit, you should generate a **small-scale** test input that is **complete and valid**.
- Output the test input directly, not code to generate it.

**Output format:**
```plaintext
{test input}
```

Think step by step.

Response:
```plaintext
1
5
1 2 3 4 5
```


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Funny Game
time_limit_ms: 2000
memory_limit_mb: 256
Description: Vanya has a graph with $$$n$$$ vertices (numbered from $$$1$$$ to $$$n$$$) and an array $$$a$$$ of $$$n$$$ integers; initially, there are no edges in the graph. Vanya got bored, and to have fun, he decided to perform $$$n - 1$$$ operations.

Operation number $$$x$$$ (operations are numbered in order starting from $$$1$$$) is as follows:

- Choose $$$2$$$ different numbers $$$1 \leq u,v \leq n$$$, such that $$$|a_u - a_v|$$$ is divisible by $$$x$$$.
- Add an undirected edge between vertices $$$u$$$ and $$$v$$$ to the graph.

Help Vanya get a connected$$$^{\text{∗}}$$$ graph using the $$$n - 1$$$ operations, or determine that it is impossible.

Input: Each test consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \le t \le 10^{3}$$$) — the number of test cases. Then follows the description of the test cases.

The first line of each test case contains the number $$$n$$$ ($$$1 \leq n \leq 2000$$$) — the number of vertices in the graph.

The second line of each test case contains $$$n$$$ numbers $$$a_1, a_2, \cdots a_n$$$ ($$$1 \leq a_i \leq 10^9$$$).

It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2000$$$.

Output: For each test case, if there is no solution, then output "No" (without quotes).

Otherwise, output "Yes" (without quotes), and then output $$$n - 1$$$ lines, where in the $$$i$$$-th line, output the numbers $$$u$$$ and $$$v$$$ that need to be chosen for operation $$$i$$$.

You can output each letter in any case (for example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as a positive answer).

Examples:
input:
8
2
1 4
4
99 7 1 13
5
10 2 31 44 73
5
87 6 81 44 32
5
62 35 33 79 16
5
6 51 31 69 42
5
52 63 25 21 5
12
33 40 3 11 31 43 37 8 50 5 12 22
output:
YES
2 1
YES
4 1
2 1
3 2
YES
5 1
4 1
3 1
2 1
YES
4 1
3 1
2 1
5 4
YES
3 1
5 1
2 1
4 2
YES
4 1
5 1
2 1
3 2
YES
2 1
5 2
3 1
4 3
YES
9 1
12 9
11 1
10 1
6 1
7 6
2 1
8 2
5 2
3 1
4 1

Note: Let's consider the second test case.

- First operation $$$(x = 1)$$$: we can connect vertices $$$4$$$ and $$$1$$$, since $$$|a_4 - a_1| = |13 - 99| = |-86| = 86$$$, and $$$86$$$ is divisible by $$$1$$$.

- Second operation $$$(x = 2)$$$: we can connect vertices $$$2$$$ and $$$1$$$, since $$$|a_2 - a_1| = |7 - 99| = |-92| = 92$$$, and $$$92$$$ is divisible by $$$2$$$.

- Third operation $$$(x = 3)$$$: we can connect vertices $$$3$$$ and $$$2$$$, since $$$|a_3 - a_2| = |1 - 7| = |-6| = 6$$$, and $$$6$$$ is divisible by $$$3$$$.

Buggy Code:
def li():return [int(i)for i in input().split()]
def find(x):
	while x!=father[x]:
		father[x]=father[father[x]]
		x=father[x]
	return x
def merge(x,y):
	x,y=find(x),find(y)
	father[y]=x

for _ in range(int(input())):
	n,=li()
	a=li()
	index={}
	father={}
	for e in a:father[e]=e
	if len(father)!=n:print("NO");continue
	for i in range(n):index[a[i]]=i+1
	ans=[[]for i in range(n)]
	s=set()
	for x in range(n-1,0,-1):
		l=[[]for i in range(x)]

		v=0
		for e in a:
			ind=e%x

			if l[ind] and ((l[ind][0] not in s) or (e not in s)):
				merge(e,l[ind][0])
				ans[x]=[e,l[ind][0]]
				for e in ans[x]:s.add(e)
				v=1
				break
			l[ind]+=[e]

		if not v:
				p=l[ind][0]
				for e in l[ind]:
					if find(e)!=find(p):
						merge(p,e)
						ans[x]=[p,e]
						break
	print("YES")
	for e in ans[1:]:print(index[e[0]],index[e[1]])

**Instructions:**
- Focus on edge cases or scenarios that maximize the failure probability in faulty solutions.
- Due to the output length limit, you should generate a **small-scale** test input that is **complete and valid**.
- Output the test input directly, not code to generate it.

**Output format:**
```plaintext
{test input}
```

Think step by step.

Response:
```plaintext
1
5
1 2 3 4 5
```


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Funny Game
time_limit_ms: 2000
memory_limit_mb: 256
Description: Vanya has a graph with $$$n$$$ vertices (numbered from $$$1$$$ to $$$n$$$) and an array $$$a$$$ of $$$n$$$ integers; initially, there are no edges in the graph. Vanya got bored, and to have fun, he decided to perform $$$n - 1$$$ operations.

Operation number $$$x$$$ (operations are numbered in order starting from $$$1$$$) is as follows:

- Choose $$$2$$$ different numbers $$$1 \leq u,v \leq n$$$, such that $$$|a_u - a_v|$$$ is divisible by $$$x$$$.
- Add an undirected edge between vertices $$$u$$$ and $$$v$$$ to the graph.

Help Vanya get a connected$$$^{\text{∗}}$$$ graph using the $$$n - 1$$$ operations, or determine that it is impossible.

Input: Each test consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \le t \le 10^{3}$$$) — the number of test cases. Then follows the description of the test cases.

The first line of each test case contains the number $$$n$$$ ($$$1 \leq n \leq 2000$$$) — the number of vertices in the graph.

The second line of each test case contains $$$n$$$ numbers $$$a_1, a_2, \cdots a_n$$$ ($$$1 \leq a_i \leq 10^9$$$).

It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2000$$$.

Output: For each test case, if there is no solution, then output "No" (without quotes).

Otherwise, output "Yes" (without quotes), and then output $$$n - 1$$$ lines, where in the $$$i$$$-th line, output the numbers $$$u$$$ and $$$v$$$ that need to be chosen for operation $$$i$$$.

You can output each letter in any case (for example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as a positive answer).

Examples:
input:
8
2
1 4
4
99 7 1 13
5
10 2 31 44 73
5
87 6 81 44 32
5
62 35 33 79 16
5
6 51 31 69 42
5
52 63 25 21 5
12
33 40 3 11 31 43 37 8 50 5 12 22
output:
YES
2 1
YES
4 1
2 1
3 2
YES
5 1
4 1
3 1
2 1
YES
4 1
3 1
2 1
5 4
YES
3 1
5 1
2 1
4 2
YES
4 1
5 1
2 1
3 2
YES
2 1
5 2
3 1
4 3
YES
9 1
12 9
11 1
10 1
6 1
7 6
2 1
8 2
5 2
3 1
4 1

Note: Let's consider the second test case.

- First operation $$$(x = 1)$$$: we can connect vertices $$$4$$$ and $$$1$$$, since $$$|a_4 - a_1| = |13 - 99| = |-86| = 86$$$, and $$$86$$$ is divisible by $$$1$$$.

- Second operation $$$(x = 2)$$$: we can connect vertices $$$2$$$ and $$$1$$$, since $$$|a_2 - a_1| = |7 - 99| = |-92| = 92$$$, and $$$92$$$ is divisible by $$$2$$$.

- Third operation $$$(x = 3)$$$: we can connect vertices $$$3$$$ and $$$2$$$, since $$$|a_3 - a_2| = |1 - 7| = |-6| = 6$$$, and $$$6$$$ is divisible by $$$3$$$.

Buggy Code:
import java.io.*;
import java.util.*;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int T = Integer.parseInt(br.readLine());
		while(T-- > 0){
			int N = Integer.parseInt(br.readLine());
			String[] s = br.readLine().split(" ");
			int[] a = new int[N];
			for(int i = 0; i < N; i++){
				a[i] = Integer.parseInt(s[i]);
			}
			Set<Integer> used = new HashSet<Integer>();
			Set<String> used2 = new HashSet<String>();
			List<String> lst = new ArrayList<String>();
			for(int mod = N-1; mod >= 1; mod--){
				//System.out.println("Mod is " + mod);
				Map<Integer,List<Integer>> mods = new HashMap<Integer,List<Integer>>();
				for(int i = 0; i < N; i++){
					if(!mods.containsKey(a[i]%mod)) mods.put(a[i]%mod, new ArrayList<Integer>());
					mods.get(a[i]%mod).add(i+1);
				}
				// find two numbers that are congruent this mod
				for(Integer r : mods.keySet()){
					List<Integer> indices = mods.get(r);
					if(indices.size() < 2) continue;
					int index1 = indices.get(0);
					int k = 1;
					boolean found = true;
					if(used.size() >= N){
						while(used2.contains(index1 + " " + indices.get(k)) || used2.contains(indices.get(k) + " " + index1)){
							k++;
							if(k == indices.size()){
								found = false;
								break;
							}
						}
					}
					else{
						while(used.contains(index1) && used.contains(indices.get(k))){
							k++;
							if(k == indices.size()){
								found = false;
								break;
							}
						}
					}

					if(!found){
						continue;
					}
					used.add(index1);
					used.add(indices.get(k));
					//System.out.println("Adding " + (index1 + " " + indices.get(k)));
					used2.add(index1 + " " + indices.get(k));
					lst.add(index1 + " " + indices.get(k));
					break;
				}
			}
			if(used.size() >= N){
				System.out.println("YES");
				for(int L = lst.size()-1; L >= 0; L--){
					System.out.println(lst.get(L));
				}
			}
			else{
				System.out.println("NO");
			}

		}

	}
}

**Instructions:**
- Focus on edge cases or scenarios that maximize the failure probability in faulty solutions.
- Due to the output length limit, you should generate a **small-scale** test input that is **complete and valid**.
- Output the test input directly, not code to generate it.

**Output format:**
```plaintext
{test input}
```

Think step by step.

Response:
```plaintext
1
5
1 2 3 4 5
```


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Funny Game
time_limit_ms: 2000
memory_limit_mb: 256
Description: Vanya has a graph with $$$n$$$ vertices (numbered from $$$1$$$ to $$$n$$$) and an array $$$a$$$ of $$$n$$$ integers; initially, there are no edges in the graph. Vanya got bored, and to have fun, he decided to perform $$$n - 1$$$ operations.

Operation number $$$x$$$ (operations are numbered in order starting from $$$1$$$) is as follows:

- Choose $$$2$$$ different numbers $$$1 \leq u,v \leq n$$$, such that $$$|a_u - a_v|$$$ is divisible by $$$x$$$.
- Add an undirected edge between vertices $$$u$$$ and $$$v$$$ to the graph.

Help Vanya get a connected$$$^{\text{∗}}$$$ graph using the $$$n - 1$$$ operations, or determine that it is impossible.

Input: Each test consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \le t \le 10^{3}$$$) — the number of test cases. Then follows the description of the test cases.

The first line of each test case contains the number $$$n$$$ ($$$1 \leq n \leq 2000$$$) — the number of vertices in the graph.

The second line of each test case contains $$$n$$$ numbers $$$a_1, a_2, \cdots a_n$$$ ($$$1 \leq a_i \leq 10^9$$$).

It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2000$$$.

Output: For each test case, if there is no solution, then output "No" (without quotes).

Otherwise, output "Yes" (without quotes), and then output $$$n - 1$$$ lines, where in the $$$i$$$-th line, output the numbers $$$u$$$ and $$$v$$$ that need to be chosen for operation $$$i$$$.

You can output each letter in any case (for example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as a positive answer).

Examples:
input:
8
2
1 4
4
99 7 1 13
5
10 2 31 44 73
5
87 6 81 44 32
5
62 35 33 79 16
5
6 51 31 69 42
5
52 63 25 21 5
12
33 40 3 11 31 43 37 8 50 5 12 22
output:
YES
2 1
YES
4 1
2 1
3 2
YES
5 1
4 1
3 1
2 1
YES
4 1
3 1
2 1
5 4
YES
3 1
5 1
2 1
4 2
YES
4 1
5 1
2 1
3 2
YES
2 1
5 2
3 1
4 3
YES
9 1
12 9
11 1
10 1
6 1
7 6
2 1
8 2
5 2
3 1
4 1

Note: Let's consider the second test case.

- First operation $$$(x = 1)$$$: we can connect vertices $$$4$$$ and $$$1$$$, since $$$|a_4 - a_1| = |13 - 99| = |-86| = 86$$$, and $$$86$$$ is divisible by $$$1$$$.

- Second operation $$$(x = 2)$$$: we can connect vertices $$$2$$$ and $$$1$$$, since $$$|a_2 - a_1| = |7 - 99| = |-92| = 92$$$, and $$$92$$$ is divisible by $$$2$$$.

- Third operation $$$(x = 3)$$$: we can connect vertices $$$3$$$ and $$$2$$$, since $$$|a_3 - a_2| = |1 - 7| = |-6| = 6$$$, and $$$6$$$ is divisible by $$$3$$$.

Buggy Code:
import java.io.*;
import java.util.*;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int T = Integer.parseInt(br.readLine());
		while(T-- > 0){
			int N = Integer.parseInt(br.readLine());
			String[] s = br.readLine().split(" ");
			int[] a = new int[N];
			for(int i = 0; i < N; i++){
				a[i] = Integer.parseInt(s[i]);
			}
			Set<Integer> used = new HashSet<Integer>();
			Set<String> used2 = new HashSet<String>();
			List<String> lst = new ArrayList<String>();
			for(int mod = N-1; mod >= 1; mod--){
				//System.out.println("Mod is " + mod);
				Map<Integer,List<Integer>> mods = new HashMap<Integer,List<Integer>>();
				for(int i = 0; i < N; i++){
					if(!mods.containsKey(a[i]%mod)) mods.put(a[i]%mod, new ArrayList<Integer>());
					mods.get(a[i]%mod).add(i+1);
				}
				// find two numbers that are congruent this mod
				for(Integer r : mods.keySet()){
					List<Integer> indices = mods.get(r);
					if(indices.size() < 2) continue;
					int index1 = indices.get(0);
					int k = 1;
					boolean found = true;
					if(used.size() == N){
						while(used2.contains(index1 + " " + indices.get(k)) || used2.contains(indices.get(k) + " " + index1)){
							k++;
							if(k == indices.size()){
								found = false;
								break;
							}
						}
					}
					else{
						while(used.contains(index1) && used.contains(indices.get(k))){
							k++;
							if(k == indices.size()){
								found = false;
								break;
							}
						}
					}

					if(!found){
						continue;
					}
					used.add(index1);
					used.add(indices.get(k));
					//System.out.println("Adding " + (index1 + " " + indices.get(k)));
					used2.add(index1 + " " + indices.get(k));
					lst.add(index1 + " " + indices.get(k));
					break;
				}
			}
			if(used.size() == N){
				System.out.println("YES");
				for(int L = N-2; L >= 0; L--){
					System.out.println(lst.get(L));
				}
			}
			else{
				System.out.println("NO");
			}

		}

	}
}

**Instructions:**
- Focus on edge cases or scenarios that maximize the failure probability in faulty solutions.
- Due to the output length limit, you should generate a **small-scale** test input that is **complete and valid**.
- Output the test input directly, not code to generate it.

**Output format:**
```plaintext
{test input}
```

Think step by step.

Response:
```plaintext
2
3
1 2 3
4
1 2 3 4
```


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Funny Game
time_limit_ms: 2000
memory_limit_mb: 256
Description: Vanya has a graph with $$$n$$$ vertices (numbered from $$$1$$$ to $$$n$$$) and an array $$$a$$$ of $$$n$$$ integers; initially, there are no edges in the graph. Vanya got bored, and to have fun, he decided to perform $$$n - 1$$$ operations.

Operation number $$$x$$$ (operations are numbered in order starting from $$$1$$$) is as follows:

- Choose $$$2$$$ different numbers $$$1 \leq u,v \leq n$$$, such that $$$|a_u - a_v|$$$ is divisible by $$$x$$$.
- Add an undirected edge between vertices $$$u$$$ and $$$v$$$ to the graph.

Help Vanya get a connected$$$^{\text{∗}}$$$ graph using the $$$n - 1$$$ operations, or determine that it is impossible.

Input: Each test consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \le t \le 10^{3}$$$) — the number of test cases. Then follows the description of the test cases.

The first line of each test case contains the number $$$n$$$ ($$$1 \leq n \leq 2000$$$) — the number of vertices in the graph.

The second line of each test case contains $$$n$$$ numbers $$$a_1, a_2, \cdots a_n$$$ ($$$1 \leq a_i \leq 10^9$$$).

It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2000$$$.

Output: For each test case, if there is no solution, then output "No" (without quotes).

Otherwise, output "Yes" (without quotes), and then output $$$n - 1$$$ lines, where in the $$$i$$$-th line, output the numbers $$$u$$$ and $$$v$$$ that need to be chosen for operation $$$i$$$.

You can output each letter in any case (for example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as a positive answer).

Examples:
input:
8
2
1 4
4
99 7 1 13
5
10 2 31 44 73
5
87 6 81 44 32
5
62 35 33 79 16
5
6 51 31 69 42
5
52 63 25 21 5
12
33 40 3 11 31 43 37 8 50 5 12 22
output:
YES
2 1
YES
4 1
2 1
3 2
YES
5 1
4 1
3 1
2 1
YES
4 1
3 1
2 1
5 4
YES
3 1
5 1
2 1
4 2
YES
4 1
5 1
2 1
3 2
YES
2 1
5 2
3 1
4 3
YES
9 1
12 9
11 1
10 1
6 1
7 6
2 1
8 2
5 2
3 1
4 1

Note: Let's consider the second test case.

- First operation $$$(x = 1)$$$: we can connect vertices $$$4$$$ and $$$1$$$, since $$$|a_4 - a_1| = |13 - 99| = |-86| = 86$$$, and $$$86$$$ is divisible by $$$1$$$.

- Second operation $$$(x = 2)$$$: we can connect vertices $$$2$$$ and $$$1$$$, since $$$|a_2 - a_1| = |7 - 99| = |-92| = 92$$$, and $$$92$$$ is divisible by $$$2$$$.

- Third operation $$$(x = 3)$$$: we can connect vertices $$$3$$$ and $$$2$$$, since $$$|a_3 - a_2| = |1 - 7| = |-6| = 6$$$, and $$$6$$$ is divisible by $$$3$$$.

Buggy Code:
#include <bits/stdc++.h>
#define _ long long
#define FOR(i,n) for (i=0;i<n;i++)
#define FOR1(i,n) for (i=1;i<=n;i++)
#define FSE(i,l,r) for (i=l;i<=r;i++)
#define FSI(i,l,r) for (i=l;i<r;i++)
#define _p pair
#define __p pair<_, _>
#define __v vector<_>
#define _v vector
#define __s set<_>
#define _us unordered_set
#define __us unordered_set<_>
#define __um unordered_map<_>
#define INF 1e9+7
#define ld long double
using namespace std;
void solve();
int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    _ T=1;
    cin>>T;
    for (;T--;)solve();
    return 0;
}
// end of template

_ a[(_)(2e5+5)];
_ p[(_)(2e5+5)];
_ find(_ x){
    return x==p[x]?x: p[x]=find(p[x]);
}
void con(_ a,_ b){
    a=find(a);
    b=find(b);
    p[a]=p[b];
}
map<_,_v<__p>>edgy;
void solve(){
    _ N,i,j,k,maximum=0;;
    cin>>N;
    FOR1(i,N){
        cin>>a[i];
        p[i]=i;
    }
    set<_p<_,__p>>edges;
    edgy.clear();
    FOR1(i,N){
        FOR1(j,N){
            if(i<j){
                // cerr<<abs(a[i]-a[j])<<"\n";
                edgy[abs(a[i]-a[j])].push_back({i,j});
                maximum=max(maximum,abs(a[i]-a[j]));
            }
        }
    }
    _v<__p>bruh;
    for(i=N-1;i>=1;i--){
        k=0;
        // auto it=edges.lower_bound({i*k,{0,0}});
        _ found=0;
        // cerr<<it->first<<"\n";
        // for(;it!=edges.end();it=edges.lower_bound({i*k,{0,0}})){
        auto it=edgy.begin();
        for(;i*k<=maximum;){
            // if(it->first!=i*k)k++;
            if(edgy[i*k].empty())k++;
            else if(find(edgy[i*k].back().first)==find(edgy[i*k].back().second)){
                edgy[i*k].pop_back();
            }
            else{
                bruh.push_back({edgy[i*k].back().first,edgy[i*k].back().second});
                con(edgy[i*k].back().first,edgy[i*k].back().second);
                // edges.erase(it);
                found=1;
                break;
            }
        }
        if(!found){
            cout<<"NO\n";
            return;
        }
    }
    cout<<"YES\n";
    for(i=N-2;i>=0;i--){
        cout<<bruh[i].first<<" "<<bruh[i].second<<"\n";
    }
}

**Instructions:**
- Focus on edge cases or scenarios that maximize the failure probability in faulty solutions.
- Due to the output length limit, you should generate a **small-scale** test input that is **complete and valid**.
- Output the test input directly, not code to generate it.

**Output format:**
```plaintext
{test input}
```

Think step by step.

Response:
```plaintext
1
5
1 2 3 4 5
```


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Funny Game
time_limit_ms: 2000
memory_limit_mb: 256
Description: Vanya has a graph with $$$n$$$ vertices (numbered from $$$1$$$ to $$$n$$$) and an array $$$a$$$ of $$$n$$$ integers; initially, there are no edges in the graph. Vanya got bored, and to have fun, he decided to perform $$$n - 1$$$ operations.

Operation number $$$x$$$ (operations are numbered in order starting from $$$1$$$) is as follows:

- Choose $$$2$$$ different numbers $$$1 \leq u,v \leq n$$$, such that $$$|a_u - a_v|$$$ is divisible by $$$x$$$.
- Add an undirected edge between vertices $$$u$$$ and $$$v$$$ to the graph.

Help Vanya get a connected$$$^{\text{∗}}$$$ graph using the $$$n - 1$$$ operations, or determine that it is impossible.

Input: Each test consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \le t \le 10^{3}$$$) — the number of test cases. Then follows the description of the test cases.

The first line of each test case contains the number $$$n$$$ ($$$1 \leq n \leq 2000$$$) — the number of vertices in the graph.

The second line of each test case contains $$$n$$$ numbers $$$a_1, a_2, \cdots a_n$$$ ($$$1 \leq a_i \leq 10^9$$$).

It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2000$$$.

Output: For each test case, if there is no solution, then output "No" (without quotes).

Otherwise, output "Yes" (without quotes), and then output $$$n - 1$$$ lines, where in the $$$i$$$-th line, output the numbers $$$u$$$ and $$$v$$$ that need to be chosen for operation $$$i$$$.

You can output each letter in any case (for example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as a positive answer).

Examples:
input:
8
2
1 4
4
99 7 1 13
5
10 2 31 44 73
5
87 6 81 44 32
5
62 35 33 79 16
5
6 51 31 69 42
5
52 63 25 21 5
12
33 40 3 11 31 43 37 8 50 5 12 22
output:
YES
2 1
YES
4 1
2 1
3 2
YES
5 1
4 1
3 1
2 1
YES
4 1
3 1
2 1
5 4
YES
3 1
5 1
2 1
4 2
YES
4 1
5 1
2 1
3 2
YES
2 1
5 2
3 1
4 3
YES
9 1
12 9
11 1
10 1
6 1
7 6
2 1
8 2
5 2
3 1
4 1

Note: Let's consider the second test case.

- First operation $$$(x = 1)$$$: we can connect vertices $$$4$$$ and $$$1$$$, since $$$|a_4 - a_1| = |13 - 99| = |-86| = 86$$$, and $$$86$$$ is divisible by $$$1$$$.

- Second operation $$$(x = 2)$$$: we can connect vertices $$$2$$$ and $$$1$$$, since $$$|a_2 - a_1| = |7 - 99| = |-92| = 92$$$, and $$$92$$$ is divisible by $$$2$$$.

- Third operation $$$(x = 3)$$$: we can connect vertices $$$3$$$ and $$$2$$$, since $$$|a_3 - a_2| = |1 - 7| = |-6| = 6$$$, and $$$6$$$ is divisible by $$$3$$$.

Buggy Code:
from sys import setrecursionlimit as setrec
setrec(10**5)
def dfs(g, u, n, done, x, op, vis):
  if x==n-1: return 1
  for i in range(1, n):
    if done[i]: continue
    for v in g[u][i]:
      if vis[v]: continue
      done[i] = vis[v] = 1
      op[i] = [u+1, v+1]
      if dfs(g, v, n, done, x+1, op, vis):
        return 1
      op[i] = done[i] = vis[v] = 0
  return 0

def main():
  n = int(input())
  #n, x = (int(i) for i in input().split())
  a = [int(i) for i in input().split()]
  #b = [int(i) for i in input().split()]
  #c = [int(i) for i in input().split()]
  #s = input()
  #t = input()
  """q = int(input())
  while q:
    l, r = map(int, input().split())
    q -= 1
    """
  b = []
  for i in range(1, n):
    f = {}
    for j in range(n):
      x = a[j]%i
      if x in f:
        f[x].append(j)
      else:
        f[x] = [j]
    b.append(f)
  #print(b)
  g = [[] for i in range(n)]
  for i in range(1, n):
    for x in b[i-1]:
      m = len(b[i-1][x])
      #print(i, m)
      for j in range(m-1):
        u = b[i-1][x][j]
        for k in range(j+1, m):
          v = b[i-1][x][k]
          g[u].append([v, i])
          g[v].append([u, i])
  fg = []
  for u in range(n):
    tmp = [[] for i in range(n)]
    for v, i in g[u]:
      tmp[i].append(v)
    fg.append(tmp)
  #print(g)
  done = [0]*n
  op = [0]*n
  vis = [0]*n
  vis[0] = 1
  if dfs(fg, 0, n, done, 0, op, vis):
    print("YES")
    for i in range(1, n):
      print(*op[i])
  else:
    print("NO")

t = int(input())
while t:
  main()
  t -= 1

**Instructions:**
- Focus on edge cases or scenarios that maximize the failure probability in faulty solutions.
- Due to the output length limit, you should generate a **small-scale** test input that is **complete and valid**.
- Output the test input directly, not code to generate it.

**Output format:**
```plaintext
{test input}
```

Think step by step.

Response:
To generate a challenging test input that exposes the bug in the provided code, we need to consider the following aspects:

1. **Edge Cases**: Test cases with small values of `n` and specific values of `a` that can cause issues in the algorithm.
2. **Special Conditions**: Cases where the values in `a` are such that the differences are not easily divisible by the operation number `x`.
3. **Complexity**: Test cases that force the algorithm to perform a significant number of operations, potentially leading to recursion depth issues or incorrect edge selections.

Let's construct a test case that meets these criteria:

### Test Case Analysis
- **Small `n`**: Use `n = 5` to keep the input small and manageable.
- **Values in `a`**: Choose values such that the differences are not easily divisible by `x` for some operations, but still allow for a connected graph.
- **Multiple Test Cases**: Include multiple test cases to ensure the algorithm can handle different scenarios.

### Constructed Test Case
```plaintext
3
5
1 2 3 4 5
5
1 3 5 7 9
5
1 10 100 1000 10000
```

### Explanation
1. **Test Case 1**: `n = 5`, `a = [1, 2, 3, 4, 5]`
   - Differences are small and easily divisible by `x`, but the algorithm needs to ensure the graph remains connected.
2. **Test Case 2**: `n = 5`, `a = [1, 3, 5, 7, 9]`
   - Differences are all odd, making it harder to find pairs divisible by even `x` values.
3. **Test Case 3**: `n = 5`, `a = [1, 10, 100, 1000, 10000]`
   - Large differences, making it challenging to find pairs divisible by small `x` values.

This test case should expose any issues in the algorithm, particularly with handling small and large differences, and ensuring the graph remains connected.


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Funny Game
time_limit_ms: 2000
memory_limit_mb: 256
Description: Vanya has a graph with $$$n$$$ vertices (numbered from $$$1$$$ to $$$n$$$) and an array $$$a$$$ of $$$n$$$ integers; initially, there are no edges in the graph. Vanya got bored, and to have fun, he decided to perform $$$n - 1$$$ operations.

Operation number $$$x$$$ (operations are numbered in order starting from $$$1$$$) is as follows:

- Choose $$$2$$$ different numbers $$$1 \leq u,v \leq n$$$, such that $$$|a_u - a_v|$$$ is divisible by $$$x$$$.
- Add an undirected edge between vertices $$$u$$$ and $$$v$$$ to the graph.

Help Vanya get a connected$$$^{\text{∗}}$$$ graph using the $$$n - 1$$$ operations, or determine that it is impossible.

Input: Each test consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \le t \le 10^{3}$$$) — the number of test cases. Then follows the description of the test cases.

The first line of each test case contains the number $$$n$$$ ($$$1 \leq n \leq 2000$$$) — the number of vertices in the graph.

The second line of each test case contains $$$n$$$ numbers $$$a_1, a_2, \cdots a_n$$$ ($$$1 \leq a_i \leq 10^9$$$).

It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2000$$$.

Output: For each test case, if there is no solution, then output "No" (without quotes).

Otherwise, output "Yes" (without quotes), and then output $$$n - 1$$$ lines, where in the $$$i$$$-th line, output the numbers $$$u$$$ and $$$v$$$ that need to be chosen for operation $$$i$$$.

You can output each letter in any case (for example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as a positive answer).

Examples:
input:
8
2
1 4
4
99 7 1 13
5
10 2 31 44 73
5
87 6 81 44 32
5
62 35 33 79 16
5
6 51 31 69 42
5
52 63 25 21 5
12
33 40 3 11 31 43 37 8 50 5 12 22
output:
YES
2 1
YES
4 1
2 1
3 2
YES
5 1
4 1
3 1
2 1
YES
4 1
3 1
2 1
5 4
YES
3 1
5 1
2 1
4 2
YES
4 1
5 1
2 1
3 2
YES
2 1
5 2
3 1
4 3
YES
9 1
12 9
11 1
10 1
6 1
7 6
2 1
8 2
5 2
3 1
4 1

Note: Let's consider the second test case.

- First operation $$$(x = 1)$$$: we can connect vertices $$$4$$$ and $$$1$$$, since $$$|a_4 - a_1| = |13 - 99| = |-86| = 86$$$, and $$$86$$$ is divisible by $$$1$$$.

- Second operation $$$(x = 2)$$$: we can connect vertices $$$2$$$ and $$$1$$$, since $$$|a_2 - a_1| = |7 - 99| = |-92| = 92$$$, and $$$92$$$ is divisible by $$$2$$$.

- Third operation $$$(x = 3)$$$: we can connect vertices $$$3$$$ and $$$2$$$, since $$$|a_3 - a_2| = |1 - 7| = |-6| = 6$$$, and $$$6$$$ is divisible by $$$3$$$.

Buggy Code:
from sys import setrecursionlimit as setrec
setrec(10**5)
def dfs(g, u, n, done, x, op, vis):
  if x==n-1: return 1
  for v, i in g[u]:
    if done[i] or vis[v]: continue
    done[i] = vis[v] = 1
    op[i] = [u+1, v+1]
    if dfs(g, v, n, done, x+1, op, vis):
      return 1
    op[i] = done[i] = vis[v] = 0
  return 0

def main():
  n = int(input())
  #n, x = (int(i) for i in input().split())
  a = [int(i) for i in input().split()]
  #b = [int(i) for i in input().split()]
  #c = [int(i) for i in input().split()]
  #s = input()
  #t = input()
  """q = int(input())
  while q:
    l, r = map(int, input().split())
    q -= 1
    """
  b = []
  for i in range(1, n):
    f = {}
    for j in range(n):
      x = a[j]%i
      if x in f:
        f[x].append(j)
      else:
        f[x] = [j]
    b.append(f)
  #print(b)
  g = [[] for i in range(n)]
  for i in range(1, n):
    for x in b[i-1]:
      m = len(b[i-1][x])
      #print(i, m)
      for j in range(m-1):
        u = b[i-1][x][j]
        for k in range(j+1, m):
          v = b[i-1][x][k]
          g[u].append([v, i])
          g[v].append([u, i])
  #print(g)
  done = [0]*n
  op = [0]*n
  vis = [0]*n
  vis[0] = 1
  if dfs(g, 0, n, done, 0, op, vis):
    print("YES")
    for i in range(1, n):
      print(*op[i])
  else:
    print("NO")

t = int(input())
while t:
  main()
  t -= 1

**Instructions:**
- Focus on edge cases or scenarios that maximize the failure probability in faulty solutions.
- Due to the output length limit, you should generate a **small-scale** test input that is **complete and valid**.
- Output the test input directly, not code to generate it.

**Output format:**
```plaintext
{test input}
```

Think step by step.

Response:
```plaintext
3
2
1 1
3
1 2 3
4
1 2 3 4
```


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Funny Game
time_limit_ms: 2000
memory_limit_mb: 256
Description: Vanya has a graph with $$$n$$$ vertices (numbered from $$$1$$$ to $$$n$$$) and an array $$$a$$$ of $$$n$$$ integers; initially, there are no edges in the graph. Vanya got bored, and to have fun, he decided to perform $$$n - 1$$$ operations.

Operation number $$$x$$$ (operations are numbered in order starting from $$$1$$$) is as follows:

- Choose $$$2$$$ different numbers $$$1 \leq u,v \leq n$$$, such that $$$|a_u - a_v|$$$ is divisible by $$$x$$$.
- Add an undirected edge between vertices $$$u$$$ and $$$v$$$ to the graph.

Help Vanya get a connected$$$^{\text{∗}}$$$ graph using the $$$n - 1$$$ operations, or determine that it is impossible.

Input: Each test consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \le t \le 10^{3}$$$) — the number of test cases. Then follows the description of the test cases.

The first line of each test case contains the number $$$n$$$ ($$$1 \leq n \leq 2000$$$) — the number of vertices in the graph.

The second line of each test case contains $$$n$$$ numbers $$$a_1, a_2, \cdots a_n$$$ ($$$1 \leq a_i \leq 10^9$$$).

It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2000$$$.

Output: For each test case, if there is no solution, then output "No" (without quotes).

Otherwise, output "Yes" (without quotes), and then output $$$n - 1$$$ lines, where in the $$$i$$$-th line, output the numbers $$$u$$$ and $$$v$$$ that need to be chosen for operation $$$i$$$.

You can output each letter in any case (for example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as a positive answer).

Examples:
input:
8
2
1 4
4
99 7 1 13
5
10 2 31 44 73
5
87 6 81 44 32
5
62 35 33 79 16
5
6 51 31 69 42
5
52 63 25 21 5
12
33 40 3 11 31 43 37 8 50 5 12 22
output:
YES
2 1
YES
4 1
2 1
3 2
YES
5 1
4 1
3 1
2 1
YES
4 1
3 1
2 1
5 4
YES
3 1
5 1
2 1
4 2
YES
4 1
5 1
2 1
3 2
YES
2 1
5 2
3 1
4 3
YES
9 1
12 9
11 1
10 1
6 1
7 6
2 1
8 2
5 2
3 1
4 1

Note: Let's consider the second test case.

- First operation $$$(x = 1)$$$: we can connect vertices $$$4$$$ and $$$1$$$, since $$$|a_4 - a_1| = |13 - 99| = |-86| = 86$$$, and $$$86$$$ is divisible by $$$1$$$.

- Second operation $$$(x = 2)$$$: we can connect vertices $$$2$$$ and $$$1$$$, since $$$|a_2 - a_1| = |7 - 99| = |-92| = 92$$$, and $$$92$$$ is divisible by $$$2$$$.

- Third operation $$$(x = 3)$$$: we can connect vertices $$$3$$$ and $$$2$$$, since $$$|a_3 - a_2| = |1 - 7| = |-6| = 6$$$, and $$$6$$$ is divisible by $$$3$$$.

Buggy Code:
#include<bits/stdc++.h>
using namespace std;

void solve();
int main() {
    int t = 1;
    cin >> t;

    while (t--) solve();
    return 0;
}

void solve() {
    int n;
    cin >> n;

    vector<int> a(n), visit(n), cnt(n), u(n), v(n);
	for (auto &it: a) cin >> it;

    for (int x = n - 1; x >= 1; --x) {
		for (int i = 0; i < x; ++i) cnt[i] = 0;
		for (int i = 1; i <= n; ++i) {
            if (visit[i] == 1) continue;
            int z = a[i - 1] % x;
			if (cnt[z] == 0) cnt[z] = i;
			else {
				u[x] = cnt[z], v[x] = i;
				visit[cnt[z]] = 1;
				break;
			}
		}
    }

    cout << "YES\n";
	for (int i = 1; i < n; ++i) cout << u[i] << " " << v[i] << "\n";
}

**Instructions:**
- Focus on edge cases or scenarios that maximize the failure probability in faulty solutions.
- Due to the output length limit, you should generate a **small-scale** test input that is **complete and valid**.
- Output the test input directly, not code to generate it.

**Output format:**
```plaintext
{test input}
```

Think step by step.

Response:
```plaintext
3
2
1 1
3
1 1 1
4
1 1 1 1
```


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Funny Game
time_limit_ms: 2000
memory_limit_mb: 256
Description: Vanya has a graph with $$$n$$$ vertices (numbered from $$$1$$$ to $$$n$$$) and an array $$$a$$$ of $$$n$$$ integers; initially, there are no edges in the graph. Vanya got bored, and to have fun, he decided to perform $$$n - 1$$$ operations.

Operation number $$$x$$$ (operations are numbered in order starting from $$$1$$$) is as follows:

- Choose $$$2$$$ different numbers $$$1 \leq u,v \leq n$$$, such that $$$|a_u - a_v|$$$ is divisible by $$$x$$$.
- Add an undirected edge between vertices $$$u$$$ and $$$v$$$ to the graph.

Help Vanya get a connected$$$^{\text{∗}}$$$ graph using the $$$n - 1$$$ operations, or determine that it is impossible.

Input: Each test consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \le t \le 10^{3}$$$) — the number of test cases. Then follows the description of the test cases.

The first line of each test case contains the number $$$n$$$ ($$$1 \leq n \leq 2000$$$) — the number of vertices in the graph.

The second line of each test case contains $$$n$$$ numbers $$$a_1, a_2, \cdots a_n$$$ ($$$1 \leq a_i \leq 10^9$$$).

It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2000$$$.

Output: For each test case, if there is no solution, then output "No" (without quotes).

Otherwise, output "Yes" (without quotes), and then output $$$n - 1$$$ lines, where in the $$$i$$$-th line, output the numbers $$$u$$$ and $$$v$$$ that need to be chosen for operation $$$i$$$.

You can output each letter in any case (for example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as a positive answer).

Examples:
input:
8
2
1 4
4
99 7 1 13
5
10 2 31 44 73
5
87 6 81 44 32
5
62 35 33 79 16
5
6 51 31 69 42
5
52 63 25 21 5
12
33 40 3 11 31 43 37 8 50 5 12 22
output:
YES
2 1
YES
4 1
2 1
3 2
YES
5 1
4 1
3 1
2 1
YES
4 1
3 1
2 1
5 4
YES
3 1
5 1
2 1
4 2
YES
4 1
5 1
2 1
3 2
YES
2 1
5 2
3 1
4 3
YES
9 1
12 9
11 1
10 1
6 1
7 6
2 1
8 2
5 2
3 1
4 1

Note: Let's consider the second test case.

- First operation $$$(x = 1)$$$: we can connect vertices $$$4$$$ and $$$1$$$, since $$$|a_4 - a_1| = |13 - 99| = |-86| = 86$$$, and $$$86$$$ is divisible by $$$1$$$.

- Second operation $$$(x = 2)$$$: we can connect vertices $$$2$$$ and $$$1$$$, since $$$|a_2 - a_1| = |7 - 99| = |-92| = 92$$$, and $$$92$$$ is divisible by $$$2$$$.

- Third operation $$$(x = 3)$$$: we can connect vertices $$$3$$$ and $$$2$$$, since $$$|a_3 - a_2| = |1 - 7| = |-6| = 6$$$, and $$$6$$$ is divisible by $$$3$$$.

Buggy Code:
import java.io.*;
import java.math.*;
import java.util.*;
import java.util.function.*;

public class FunnyGame {

    public static void main(String[] args) {
        Scanner sc = new Scanner();
        int t = sc.nextInt();
        while (t-- > 0) {
            int n = sc.nextInt();
            long[] arr = sc.nextLongArray(n);
            DSU dsu = new DSU(n);
            List<DualState<Integer, Integer>> result = new ArrayList<>();
            List<Byte>[][] grid = new List[n][n];
            for(byte i = 0; i < n; i++) {
                for(int x = 1; x <= n - 1; x++) {
                    int y = (int) (arr[i] % x);
                    if(grid[x][y] == null) {
                        grid[x][y] = new ArrayList<>(n);
                    }
                    grid[x][y].add(i);
                }
            }
            for(int op = n - 1; op >= 1; op--) {
                boolean worked = false;
                for(int i = 0; i < n - 1; i++) {
                    List<Byte> list = grid[op][i];
                    if(list == null) continue;
                    int size = list.size();
                    for(int a = 0; a < size - 1; a++) {
                        for(int b = a + 1; b < size; b++) {
                            int x = list.get(a);
                            int y = list.get(b);
                            boolean union = dsu.union(x, y);
                            if(union) {
                                worked = true;
                                result.add(new DualState<>(x + 1, y + 1));
                                break;
                            }
                        }
                        if(worked) break;
                    }
                    if(worked) break;
                }
            }
            if(dsu.fullyConnected()) {
                System.out.println("YES");
                for(int i = result.size() - 1; i >= 0; i--) {
                    System.out.println(result.get(i).toString("", " ", ""));
                }
            }
            else {
                System.out.println("NO");
            }
        }
    }

    @SuppressWarnings("all")
    static boolean debug = false;

    @SuppressWarnings("all")
    static int gcd(int a, int b) {
        return b == 0 ? a : gcd(b, a % b);
    }

    @SuppressWarnings("all")
    static long gcd(long a, long b) {
        return b == 0 ? a : gcd(b, a % b);
    }

    @SuppressWarnings("all")
    static long lcm(long a, long b) {
        return a / gcd(a, b) * b;
    }

    @SuppressWarnings("all")
    static long phi(long n) {
        long result = n;
        for (long x = 2; x * x <= n; x++) {
            if (n % x == 0) {
                while (n % x == 0) n /= x;
                result -= result / x;
            }
        }
        return result - (n > 1 ? result / n : 0);
    }

    @SuppressWarnings("all")
    static PrintWriter pw = new PrintWriter(System.out);
    @SuppressWarnings("all")
    static String delim = " ";

    @SuppressWarnings("all")
    static void println() {
        pw.println();
        if (debug) pw.flush();
    }

    @SuppressWarnings("all")
    static void print(Object x) {
        pw.print(x);
        if (debug) pw.flush();
    }

    @SuppressWarnings("all")
    static <T> void println(Object x) {
        if (x.getClass().isArray()) {
            String result = switch (x) {
                case int[] arr -> Arrays.toString(arr);
                case long[] arr -> Arrays.toString(arr);
                case double[] arr -> Arrays.toString(arr);
                case float[] arr -> Arrays.toString(arr);
                case boolean[] arr -> Arrays.toString(arr);
                case short[] arr -> Arrays.toString(arr);
                case char[] arr -> Arrays.toString(arr);
                default -> Arrays.toString((T[]) x);
            };
            pw.println(result);
            if (debug) pw.flush();
            return;
        }
        pw.println(x);
        if (debug) pw.flush();
    }

    @SuppressWarnings("all")
    static <T> void iterPrint(Iterable<T> arr) {
        boolean space = false;
        for (T t : arr) {
            if (space) print(delim);
            print(t);
            space = true;
        }
        println();
    }

    @SuppressWarnings("all")
    static <T> void iterPrint(T[] arr) {
        boolean space = false;
        for (T t : arr) {
            if (space) print(delim);
            print(t);
            space = true;
        }
        println();
    }

    @SuppressWarnings("all")
    static void iterPrint(int[] arr) {
        boolean space = false;
        for (int t : arr) {
            if (space) print(delim);
            print(t);
            space = true;
        }
        println();
    }

    @SuppressWarnings("all")
    static void iterPrint(long[] arr) {
        boolean space = false;
        for (long t : arr) {
            if (space) print(delim);
            print(t);
            space = true;
        }
        println();
    }

    @SuppressWarnings("all")
    static void iterPrint(double[] arr) {
        boolean space = false;
        for (double t : arr) {
            if (space) print(delim);
            print(t);
            space = true;
        }
        println();
    }

    @SuppressWarnings("all")
    static void iterPrint(char[] arr) {
        boolean space = false;
        for (char t : arr) {
            if (space) print(delim);
            print(t);
            space = true;
        }
        println();
    }

    @SuppressWarnings("all")
    static void iterPrint(boolean[] arr) {
        boolean space = false;
        for (boolean t : arr) {
            if (space) print(delim);
            print(t);
            space = true;
        }
        println();
    }

    @SuppressWarnings("all")
    static void iterPrint(float[] arr) {
        boolean space = false;
        for (float t : arr) {
            if (space) print(delim);
            print(t);
            space = true;
        }
        println();
    }

    @SuppressWarnings("all")
    static void iterPrint(short[] arr) {
        boolean space = false;
        for (short t : arr) {
            if (space) print(delim);
            print(t);
            space = true;
        }
        println();
    }

    @SuppressWarnings("all")
    static void iterPrint(byte[] arr) {
        boolean space = false;
        for (short t : arr) {
            if (space) print(delim);
            print(t);
            space = true;
        }
        println();
    }

    @SuppressWarnings("all")
    static void printf(String format, Object... args) {
        pw.printf(format, args);
        if (debug) pw.flush();
    }

    @SuppressWarnings("all")
    static class Scanner {
        BufferedReader br;
        StringTokenizer curr;
        String delim = " \t\n\r\f";

        Scanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        Scanner(String fileName) throws FileNotFoundException {
            br = new BufferedReader(new FileReader(fileName));
        }

        boolean setDelimiter(String delim) {
            this.delim = delim;
            return curr == null;
        }

        String getDelimiter() {
            return delim;
        }

        String next() {
            if (curr == null) {
                try {
                    curr = new StringTokenizer(br.readLine(), delim);
                } catch (IOException e) {
                    return null;
                }
            }
            String result = curr.nextToken();
            if (!curr.hasMoreTokens()) curr = null;
            return result;
        }

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

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

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

        float nextFloat() {
            return Float.parseFloat(next());
        }

        BigInteger nextBigInteger() {
            return new BigInteger(next());
        }

        boolean nextBoolean() {
            return Boolean.parseBoolean(next());
        }

        byte nextByte() {
            return Byte.parseByte(next());
        }

        short nextShort() {
            return Short.parseShort(next());
        }

        String nextLine() {
            if (curr == null) {
                try {
                    return br.readLine();
                } catch (IOException e) {
                    return null;
                }
            }
            StringBuilder remaining = new StringBuilder();
            remaining.append(curr.nextToken());
            while (curr.hasMoreTokens()) {
                remaining.append(' ').append(curr.nextToken());
            }
            return remaining.toString();
        }

        String[] nextStringArray(int n) {
            String[] arr = new String[n];
            for (int i = 0; i < n; i++) {
                arr[i] = next();
            }
            return arr;
        }

        int[] nextIntArray(int n) {
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextInt();
            }
            return arr;
        }

        long[] nextLongArray(int n) {
            long[] arr = new long[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextLong();
            }
            return arr;
        }

        double[] nextDoubleArray(int n) {
            double[] arr = new double[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextDouble();
            }
            return arr;
        }

        float[] nextFloatArray(int n) {
            float[] arr = new float[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextFloat();
            }
            return arr;
        }

        BigInteger[] nextBigIntegerArray(int n) {
            BigInteger[] arr = new BigInteger[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextBigInteger();
            }
            return arr;
        }

        boolean[] nextBooleanArray(int n) {
            boolean[] arr = new boolean[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextBoolean();
            }
            return arr;
        }

        byte[] nextByteArray(int n) {
            byte[] arr = new byte[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextByte();
            }
            return arr;
        }

        short[] nextShortArray(int n) {
            short[] arr = new short[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextShort();
            }
            return arr;
        }

        List<String> nextStringList(int n) {
            List<String> list = new ArrayList<>(n);
            for (int i = 0; i < n; i++) {
                list.add(next());
            }
            return list;
        }

        List<Integer> nextIntList(int n) {
            List<Integer> list = new ArrayList<>(n);
            for (int i = 0; i < n; i++) {
                list.add(nextInt());
            }
            return list;
        }

        List<Long> nextLongList(int n) {
            List<Long> list = new ArrayList<>(n);
            for (int i = 0; i < n; i++) {
                list.add(nextLong());
            }
            return list;
        }

        List<Double> nextDoubleList(int n) {
            List<Double> list = new ArrayList<>(n);
            for (int i = 0; i < n; i++) {
                list.add(nextDouble());
            }
            return list;
        }

        List<Float> nextFloatList(int n) {
            List<Float> list = new ArrayList<>(n);
            for (int i = 0; i < n; i++) {
                list.add(nextFloat());
            }
            return list;
        }

        List<BigInteger> nextBigIntegerList(int n) {
            List<BigInteger> list = new ArrayList<>(n);
            for (int i = 0; i < n; i++) {
                list.add(nextBigInteger());
            }
            return list;
        }

        List<Boolean> nextBooleanList(int n) {
            List<Boolean> list = new ArrayList<>(n);
            for (int i = 0; i < n; i++) {
                list.add(nextBoolean());
            }
            return list;
        }

        List<Byte> nextByteList(int n) {
            List<Byte> list = new ArrayList<>(n);
            for (int i = 0; i < n; i++) {
                list.add(nextByte());
            }
            return list;
        }

        List<Short> nextShortList(int n) {
            List<Short> list = new ArrayList<>(n);
            for (int i = 0; i < n; i++) {
                list.add(nextShort());
            }
            return list;
        }
    }

    @SuppressWarnings("all")
    static class ListNode<T> {
        ListNode<T> prev;
        ListNode<T> next;
        T val;

        ListNode() {
            val = null;
        }

        ListNode(T val) {
            this.val = val;
        }

        @Override
        public String toString() {
            StringBuilder result = new StringBuilder();
            if (prev != null) {
                result.append(prev.val);
                result.append(" -> ");
            }
            result.append(val);
            if (next != null) {
                result.append(" <- ");
                result.append(next.val);
            }
            return result.toString();
        }

        public String forwardString() {
            return forwardString("[", ", ", "]");
        }

        public String backwarString() {
            return backwardString("[", ", ", "]");
        }

        public String forwardString(String prefix, String delim, String suffix) {
            StringBuilder result = new StringBuilder();
            result.append(prefix);
            result.append(val);
            ListNode<T> curr = next;
            while (curr != null) {
                result.append(delim);
                result.append(curr.val);
                curr = curr.next;
            }
            result.append(suffix);
            return result.toString();
        }

        private String backwardString(String prefix, String delim, String suffix) {
            StringBuilder result = new StringBuilder();
            result.append(suffix);
            result.insert(0, val);
            ListNode<T> curr = prev;
            while (curr != null) {
                result.insert(0, delim);
                result.insert(0, curr.val);
                curr = curr.prev;
            }
            result.insert(0, prefix);
            return result.toString();
        }
    }

    @SuppressWarnings("all")
    static class BSTNode<T> {
        public BSTNode<T> left;
        public BSTNode<T> right;
        public T val;

        public BSTNode() {
            this.val = null;
        }

        public BSTNode(T val) {
            this.val = val;
        }

        public List<T> toPreorderList() {
            List<T> result = new ArrayList<>();
            executePreOrder(node -> result.add(node.val));
            return result;
        }

        public List<T> toInorderList() {
            List<T> result = new ArrayList<>();
            executeInOrder(node -> result.add(node.val));
            return result;
        }

        public List<T> toPostorderList() {
            List<T> result = new ArrayList<>();
            executePostOrder(node -> result.add(node.val));
            return result;
        }

        public void executePreOrder(Consumer<BSTNode<T>> action) {
            action.accept(this);
            if (left != null) left.executePreOrder(action);
            if (right != null) right.executePreOrder(action);
        }

        public void executeInOrder(Consumer<BSTNode<T>> action) {
            if (left != null) left.executeInOrder(action);
            action.accept(this);
            if (right != null) right.executeInOrder(action);
        }

        public void executePostOrder(Consumer<BSTNode<T>> action) {
            if (left != null) left.executePostOrder(action);
            if (right != null) right.executePostOrder(action);
            action.accept(this);
        }

        public <R> R accumulatePreOrder(R initial, Function<BSTNode<T>, R> function, BiFunction<R, R, R> accumulator) {
            R result = initial;
            result = accumulator.apply(result, function.apply(this));
            if (left != null) result = left.accumulatePreOrder(result, function, accumulator);
            if (right != null) result = right.accumulatePreOrder(result, function, accumulator);
            return result;
        }

        public <R> R accumulateInOrder(R initial, Function<BSTNode<T>, R> function, BiFunction<R, R, R> accumulator) {
            R result = initial;
            if (left != null) result = left.accumulateInOrder(result, function, accumulator);
            result = accumulator.apply(result, function.apply(this));
            if (right != null) result = right.accumulateInOrder(result, function, accumulator);
            return result;
        }

        public <R> R accumulatePostOrder(R initial, Function<BSTNode<T>, R> function, BiFunction<R, R, R> accumulator) {
            R result = initial;
            if (left != null) result = left.accumulatePostOrder(result, function, accumulator);
            if (right != null) result = right.accumulatePostOrder(result, function, accumulator);
            result = accumulator.apply(result, function.apply(this));
            return result;
        }
    }

    @SuppressWarnings("all")
    static class DSU {
        int[] parents;
        int[] sizes;
        int components;

        public DSU(int n) {
            parents = new int[n];
            sizes = new int[n];
            for (int i = 0; i < n; i++) {
                parents[i] = i;
                sizes[i] = 1;
            }
            components = n;
        }

        public int find(int x) {
            return parents[x] == x ? x : (parents[x] = find(parents[x]));
        }

        public boolean union(int x, int y) {
            int xRoot = find(x);
            int yRoot = find(y);
            if (xRoot == yRoot) return false;
            if (sizes[xRoot] < sizes[yRoot]) {
                return union(yRoot, xRoot);
            }
            parents[yRoot] = xRoot;
            sizes[xRoot] += sizes[yRoot];
            components--;
            return true;
        }

        public boolean connected(int x, int y) {
            return find(x) == find(y);
        }

        public boolean fullyConnected() {
            return components == 1;
        }
    }

    @SuppressWarnings("all")
    static class SegTree<T, R> {
        private final BiFunction<R, R, R> accumulator;
        private final Function<T, R> mapper;
        int n;
        R[] tree;

        SegTree(T[] arr, Function<T, R> individualMapper, BiFunction<R, R, R> accumulator) {
            tree = (R[]) new Object[arr.length << 2];
            this.n = arr.length;
            this.mapper = individualMapper;
            this.accumulator = accumulator;
            build(arr, 0, 0, n - 1);
        }

        SegTree(List<T> list, Function<T, R> individualMapper, BiFunction<R, R, R> accumulator) {
            tree = (R[]) new Object[list.size() << 2];
            this.n = list.size();
            this.mapper = individualMapper;
            this.accumulator = accumulator;
            build(list, 0, 0, n - 1);
        }

        private void build(T[] arr, int i, int l, int r) {
            if (l == r) {
                tree[i] = mapper.apply(arr[l]);
                return;
            }
            int m = (l + r) / 2;
            int i1 = i * 2 + 1, i2 = i1 + 1;
            build(arr, i1, l, m);
            build(arr, i2, m + 1, r);
            tree[i] = accumulator.apply(tree[i1], tree[i2]);
        }

        private void build(List<T> list, int i, int l, int r) {
            if (l == r) {
                tree[i] = mapper.apply(list.get(l));
                return;
            }
            int m = (l + r) / 2;
            int i1 = i * 2 + 1, i2 = i1 + 1;
            build(list, i1, l, m);
            build(list, i2, m + 1, r);
            tree[i] = accumulator.apply(tree[i1], tree[i2]);
        }

        R query(int l, int r) {
            return query(0, 0, n - 1, l, r);
        }

        private R query(int i, int cl, int cr, int l, int r) {
            if (l > r || l < 0 || r >= n)
                throw new IllegalArgumentException("Invalid Range: " + l + ", " + r + " for size " + n);
            if (l == cl && r == cr) return tree[i];
            int m = (cl + cr) / 2;
            int i1 = i * 2 + 1, i2 = i1 + 1;
            if (m >= r) {
                return query(i1, cl, m, l, r);
            } else if (m < l) {
                return query(i2, m + 1, cr, l, r);
            } else {
                return accumulator.apply(query(i1, cl, m, l, m), query(i2, m + 1, cr, m + 1, r));
            }
        }

        void set(int index, T val) {
            update(0, 0, n - 1, index, val);
        }

        private void update(int i, int l, int r, int index, T val) {
            if (l == r) {
                tree[i] = mapper.apply(val);
                return;
            }
            int m = (l + r) / 2;
            int i1 = i * 2 + 1, i2 = i1 + 1;
            if (index <= m) update(i1, l, m, index, val);
            else update(i2, m + 1, r, index, val);
            tree[i] = accumulator.apply(tree[i1], tree[i2]);
        }
    }

    @SuppressWarnings("all")
    static class State<A> {
        public A a;

        public State() {
            a = null;
        }

        public State(A a) {
            this.a = a;
        }

        @Override
        public String toString() {
            return toString("<", ">");
        }

        public String toString(String prefix, String suffix) {
            StringBuilder sb = new StringBuilder();
            sb.append(prefix);
            sb.append(a);
            sb.append(suffix);
            return sb.toString();
        }
    }

    @SuppressWarnings("all")
    static class DualState<A, B> {
        public A a;
        public B b;

        public DualState() {
            a = null;
            b = null;
        }

        public DualState(A a, B b) {
            this.a = a;
            this.b = b;
        }

        @Override
        public String toString() {
            return toString("<", ", ", ">");
        }

        public String toString(String prefix, String delimiter, String suffix) {
            StringBuilder sb = new StringBuilder();
            sb.append(prefix);
            sb.append(a);
            sb.append(delimiter);
            sb.append(b);
            sb.append(suffix);
            return sb.toString();
        }
    }

    @SuppressWarnings("all")
    static class TriState<A, B, C> {
        public A a;
        public B b;
        public C c;

        public TriState() {
            a = null;
            b = null;
            c = null;
        }

        public TriState(A a, B b, C c) {
            this.a = a;
            this.b = b;
            this.c = c;
        }

        @Override
        public String toString() {
            return toString("<", ", ", ">");
        }

        public String toString(String prefix, String delimiter, String suffix) {
            StringBuilder sb = new StringBuilder();
            sb.append(prefix);
            sb.append(a);
            sb.append(delimiter);
            sb.append(b);
            sb.append(delimiter);
            sb.append(c);
            sb.append(suffix);
            return sb.toString();
        }
    }

    @SuppressWarnings("all")
    static class QuadState<A, B, C, D> {
        public A a;
        public B b;
        public C c;
        public D d;

        public QuadState() {
            a = null;
            b = null;
            c = null;
            d = null;
        }

        public QuadState(A a, B b, C c, D d) {
            this.a = a;
            this.b = b;
            this.c = c;
            this.d = d;
        }

        @Override
        public String toString() {
            return toString("<", ", ", ">");
        }

        public String toString(String prefix, String delimiter, String suffix) {
            StringBuilder sb = new StringBuilder();
            sb.append(prefix);
            sb.append(a);
            sb.append(delimiter);
            sb.append(b);
            sb.append(delimiter);
            sb.append(c);
            sb.append(delimiter);
            sb.append(d);
            sb.append(suffix);
            return sb.toString();
        }
    }
}

**Instructions:**
- Focus on edge cases or scenarios that maximize the failure probability in faulty solutions.
- Due to the output length limit, you should generate a **small-scale** test input that is **complete and valid**.
- Output the test input directly, not code to generate it.

**Output format:**
```plaintext
{test input}
```

Think step by step.

Response:
To generate a test input that exposes the bug in the given code, we need to consider edge cases and scenarios that are likely to cause issues. Here are the steps to think through this:

1. **Small Scale**: Since the output length is limited, we should focus on a small number of vertices and operations. A small test case with 4 or 5 vertices is a good starting point.

2. **Edge Cases**:
   - **All Elements Equal**: This will test if the code can handle a situation where all elements in the array are the same.
   - **Elements with Large Differences**: This will test if the code can handle large differences between elements.
   - **Elements with Small Differences**: This will test if the code can handle small differences between elements.
   - **Elements with Specific Modulo Properties**: This will test if the code can handle elements that have specific modulo properties, especially when the modulo is a small number.

3. **Connectedness**: The code should ensure that the graph remains connected. We need to create a test case where the graph might not be connected if the code has a bug.

Based on these considerations, let's create a small-scale test input:

```plaintext
3
4
1 2 3 4
5
1 1 1 1 1
4
1 10 100 1000
```

### Explanation:
1. **Test Case 1**: `4 1 2 3 4`
   - This test case has elements with small differences.
   - The code should be able to find edges for each operation.

2. **Test Case 2**: `5 1 1 1 1 1`
   - This test case has all elements equal.
   - The code should be able to find edges for each operation, as all elements are the same.

3. **Test Case 3**: `4 1 10 100 1000`
   - This test case has elements with large differences.
   - The code should be able to find edges for each operation, but it might fail if it doesn't handle large differences correctly.

This test input should help expose any bugs in the code, especially in handling edge cases and ensuring the graph remains connected.


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Funny Game
time_limit_ms: 2000
memory_limit_mb: 256
Description: Vanya has a graph with $$$n$$$ vertices (numbered from $$$1$$$ to $$$n$$$) and an array $$$a$$$ of $$$n$$$ integers; initially, there are no edges in the graph. Vanya got bored, and to have fun, he decided to perform $$$n - 1$$$ operations.

Operation number $$$x$$$ (operations are numbered in order starting from $$$1$$$) is as follows:

- Choose $$$2$$$ different numbers $$$1 \leq u,v \leq n$$$, such that $$$|a_u - a_v|$$$ is divisible by $$$x$$$.
- Add an undirected edge between vertices $$$u$$$ and $$$v$$$ to the graph.

Help Vanya get a connected$$$^{\text{∗}}$$$ graph using the $$$n - 1$$$ operations, or determine that it is impossible.

Input: Each test consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \le t \le 10^{3}$$$) — the number of test cases. Then follows the description of the test cases.

The first line of each test case contains the number $$$n$$$ ($$$1 \leq n \leq 2000$$$) — the number of vertices in the graph.

The second line of each test case contains $$$n$$$ numbers $$$a_1, a_2, \cdots a_n$$$ ($$$1 \leq a_i \leq 10^9$$$).

It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2000$$$.

Output: For each test case, if there is no solution, then output "No" (without quotes).

Otherwise, output "Yes" (without quotes), and then output $$$n - 1$$$ lines, where in the $$$i$$$-th line, output the numbers $$$u$$$ and $$$v$$$ that need to be chosen for operation $$$i$$$.

You can output each letter in any case (for example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as a positive answer).

Examples:
input:
8
2
1 4
4
99 7 1 13
5
10 2 31 44 73
5
87 6 81 44 32
5
62 35 33 79 16
5
6 51 31 69 42
5
52 63 25 21 5
12
33 40 3 11 31 43 37 8 50 5 12 22
output:
YES
2 1
YES
4 1
2 1
3 2
YES
5 1
4 1
3 1
2 1
YES
4 1
3 1
2 1
5 4
YES
3 1
5 1
2 1
4 2
YES
4 1
5 1
2 1
3 2
YES
2 1
5 2
3 1
4 3
YES
9 1
12 9
11 1
10 1
6 1
7 6
2 1
8 2
5 2
3 1
4 1

Note: Let's consider the second test case.

- First operation $$$(x = 1)$$$: we can connect vertices $$$4$$$ and $$$1$$$, since $$$|a_4 - a_1| = |13 - 99| = |-86| = 86$$$, and $$$86$$$ is divisible by $$$1$$$.

- Second operation $$$(x = 2)$$$: we can connect vertices $$$2$$$ and $$$1$$$, since $$$|a_2 - a_1| = |7 - 99| = |-92| = 92$$$, and $$$92$$$ is divisible by $$$2$$$.

- Third operation $$$(x = 3)$$$: we can connect vertices $$$3$$$ and $$$2$$$, since $$$|a_3 - a_2| = |1 - 7| = |-6| = 6$$$, and $$$6$$$ is divisible by $$$3$$$.

Buggy Code:
import java.util.Arrays;
import java.util.HashMap;
import java.util.Scanner;

public class CF1994D {
    static String string = "";
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int Cases = Integer.parseInt(in.nextLine());

        for(;Cases>0;Cases--) {
            int n = in.nextInt();
            int[] nums = new int[n];
            for(int i=0;i<n;i++){
                nums[i] = in.nextInt();
            }
            int[] used = new int[n];
            used[0] = 1;
            if(!dfs(nums, used, 1)){
                System.out.println("NO");
            } else {
                System.out.println("YES");
                System.out.print(string);
            }
            string = "";
        }
    }

    static boolean dfs(int[] nums, int[] used, int chushu){
        // System.out.println(Arrays.toString(nums));
        // System.out.println(Arrays.toString(used));
        // System.out.println(chushu);
        // System.out.println();
        if(chushu == nums.length){
            return true;
        }
        for(int i=0;i<nums.length;i++){
            if(used[i]!=0){
                continue;
            }
            for(int j=0;j<nums.length;j++){
                if(used[j]==0){
                    continue;
                }
                if(Math.abs(nums[i]-nums[j]) % chushu != 0){
                    continue;
                }
                used[i] = 1;
                if(dfs(nums, used, chushu+1)){
                    string = (i+1)+" "+(j+1)+"\n"+string;
                    return true;
                }
                used[i] = 0;
            }
        }
        return false;
    }
}

**Instructions:**
- Focus on edge cases or scenarios that maximize the failure probability in faulty solutions.
- Due to the output length limit, you should generate a **small-scale** test input that is **complete and valid**.
- Output the test input directly, not code to generate it.

**Output format:**
```plaintext
{test input}
```

Think step by step.

Response:
```plaintext
1
4
1 2 3 4
```

**Explanation:**
- This test case is designed to expose the bug in the code by providing a small set of numbers that are sequentially increasing.
- The expected output is "NO" because it is impossible to form a connected graph with the given constraints:
  - For the first operation (x = 1), we can connect any two nodes since the difference between any two numbers is divisible by 1.
  - For the second operation (x = 2), the only possible connections are (1, 3) or (2, 4), but neither will help in forming a connected graph with the remaining nodes.
  - For the third operation (x = 3), the only possible connection is (1, 4), but this will not connect all nodes.
- The buggy code might fail to correctly determine that it is impossible to form a connected graph in this scenario.


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Funny Game
time_limit_ms: 2000
memory_limit_mb: 256
Description: Vanya has a graph with $$$n$$$ vertices (numbered from $$$1$$$ to $$$n$$$) and an array $$$a$$$ of $$$n$$$ integers; initially, there are no edges in the graph. Vanya got bored, and to have fun, he decided to perform $$$n - 1$$$ operations.

Operation number $$$x$$$ (operations are numbered in order starting from $$$1$$$) is as follows:

- Choose $$$2$$$ different numbers $$$1 \leq u,v \leq n$$$, such that $$$|a_u - a_v|$$$ is divisible by $$$x$$$.
- Add an undirected edge between vertices $$$u$$$ and $$$v$$$ to the graph.

Help Vanya get a connected$$$^{\text{∗}}$$$ graph using the $$$n - 1$$$ operations, or determine that it is impossible.

Input: Each test consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \le t \le 10^{3}$$$) — the number of test cases. Then follows the description of the test cases.

The first line of each test case contains the number $$$n$$$ ($$$1 \leq n \leq 2000$$$) — the number of vertices in the graph.

The second line of each test case contains $$$n$$$ numbers $$$a_1, a_2, \cdots a_n$$$ ($$$1 \leq a_i \leq 10^9$$$).

It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2000$$$.

Output: For each test case, if there is no solution, then output "No" (without quotes).

Otherwise, output "Yes" (without quotes), and then output $$$n - 1$$$ lines, where in the $$$i$$$-th line, output the numbers $$$u$$$ and $$$v$$$ that need to be chosen for operation $$$i$$$.

You can output each letter in any case (for example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as a positive answer).

Examples:
input:
8
2
1 4
4
99 7 1 13
5
10 2 31 44 73
5
87 6 81 44 32
5
62 35 33 79 16
5
6 51 31 69 42
5
52 63 25 21 5
12
33 40 3 11 31 43 37 8 50 5 12 22
output:
YES
2 1
YES
4 1
2 1
3 2
YES
5 1
4 1
3 1
2 1
YES
4 1
3 1
2 1
5 4
YES
3 1
5 1
2 1
4 2
YES
4 1
5 1
2 1
3 2
YES
2 1
5 2
3 1
4 3
YES
9 1
12 9
11 1
10 1
6 1
7 6
2 1
8 2
5 2
3 1
4 1

Note: Let's consider the second test case.

- First operation $$$(x = 1)$$$: we can connect vertices $$$4$$$ and $$$1$$$, since $$$|a_4 - a_1| = |13 - 99| = |-86| = 86$$$, and $$$86$$$ is divisible by $$$1$$$.

- Second operation $$$(x = 2)$$$: we can connect vertices $$$2$$$ and $$$1$$$, since $$$|a_2 - a_1| = |7 - 99| = |-92| = 92$$$, and $$$92$$$ is divisible by $$$2$$$.

- Third operation $$$(x = 3)$$$: we can connect vertices $$$3$$$ and $$$2$$$, since $$$|a_3 - a_2| = |1 - 7| = |-6| = 6$$$, and $$$6$$$ is divisible by $$$3$$$.

Buggy Code:
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back

vector<ll>par(3000);
vector<ll>ranki(3000);
vector<ll>sz(3000);
ll ans=0;
ll ansp;

void make(ll n)
{
    for(int i=1;i<n+1;i++)
    {
        par[i]=i;
        ranki[i]=0;
        sz[i]=1;
    }
}

ll findpar(ll x)
{
    if(par[x]==x)return x;
    else
    return par[x]=findpar(par[x]);
}
void unioni(ll x,ll y)
{
    x=findpar(x);
    y=findpar(y);
    if(x==y)
    {
        return;//already merged
    }
    if(ranki[x]<ranki[y])
    {
        par[x]=y;
        sz[y]+=sz[x];
    }

    else if(ranki[x]>ranki[y]){
        par[y]=x;
        sz[x]+=sz[y];
    }

    else{
        par[x]=y;
        sz[y]+=sz[x];
        ranki[y]++;
    }
}

void solve()
{
   ll n;
   cin>>n;
   ll a[n];
   for(int i=0;i<n;i++)cin>>a[i];

    vector<map<ll,vector<ll>>>v(n+1);

    for(int i=0;i<n;i++){
        for(int j=1;j<n;j++){
            v[j][a[i]%j].push_back(i+1);
        }
    }
    make(n+1);
    vector<pair<ll,ll>>ans;
    for(int i=n-1;i>=0;i--){
        bool cd=false;
        for(auto g:v[i]){
            if(cd)break;
            if(g.second.size()>=2){
                vector<pair<ll,ll>>vp;
                for(int j=0;j<g.second.size();j++){
                    vp.push_back({findpar(g.second[j]),g.second[j]});
                }
                sort(vp.begin(),vp.end());
                if(vp[0].first!=vp.back().first){
                    ans.push_back({vp[0].second,vp.back().second});
                    cd=1;
                    unioni(vp[0].second,vp.back().second);
                }
            }
        }
    }
    reverse(ans.begin(),ans.end());
    cout<<"Yes\n";
    for(auto [a,b]:ans){
        cout<<a<<" "<<b<<endl;
    }

}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);
    ll t=1;
    cin>>t;
    while(t--)solve();
}

**Instructions:**
- Focus on edge cases or scenarios that maximize the failure probability in faulty solutions.
- Due to the output length limit, you should generate a **small-scale** test input that is **complete and valid**.
- Output the test input directly, not code to generate it.

**Output format:**
```plaintext
{test input}
```

Think step by step.

Response:
```plaintext
1
5
1 2 3 4 5
```


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Funny Game
time_limit_ms: 2000
memory_limit_mb: 256
Description: Vanya has a graph with $$$n$$$ vertices (numbered from $$$1$$$ to $$$n$$$) and an array $$$a$$$ of $$$n$$$ integers; initially, there are no edges in the graph. Vanya got bored, and to have fun, he decided to perform $$$n - 1$$$ operations.

Operation number $$$x$$$ (operations are numbered in order starting from $$$1$$$) is as follows:

- Choose $$$2$$$ different numbers $$$1 \leq u,v \leq n$$$, such that $$$|a_u - a_v|$$$ is divisible by $$$x$$$.
- Add an undirected edge between vertices $$$u$$$ and $$$v$$$ to the graph.

Help Vanya get a connected$$$^{\text{∗}}$$$ graph using the $$$n - 1$$$ operations, or determine that it is impossible.

Input: Each test consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \le t \le 10^{3}$$$) — the number of test cases. Then follows the description of the test cases.

The first line of each test case contains the number $$$n$$$ ($$$1 \leq n \leq 2000$$$) — the number of vertices in the graph.

The second line of each test case contains $$$n$$$ numbers $$$a_1, a_2, \cdots a_n$$$ ($$$1 \leq a_i \leq 10^9$$$).

It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2000$$$.

Output: For each test case, if there is no solution, then output "No" (without quotes).

Otherwise, output "Yes" (without quotes), and then output $$$n - 1$$$ lines, where in the $$$i$$$-th line, output the numbers $$$u$$$ and $$$v$$$ that need to be chosen for operation $$$i$$$.

You can output each letter in any case (for example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as a positive answer).

Examples:
input:
8
2
1 4
4
99 7 1 13
5
10 2 31 44 73
5
87 6 81 44 32
5
62 35 33 79 16
5
6 51 31 69 42
5
52 63 25 21 5
12
33 40 3 11 31 43 37 8 50 5 12 22
output:
YES
2 1
YES
4 1
2 1
3 2
YES
5 1
4 1
3 1
2 1
YES
4 1
3 1
2 1
5 4
YES
3 1
5 1
2 1
4 2
YES
4 1
5 1
2 1
3 2
YES
2 1
5 2
3 1
4 3
YES
9 1
12 9
11 1
10 1
6 1
7 6
2 1
8 2
5 2
3 1
4 1

Note: Let's consider the second test case.

- First operation $$$(x = 1)$$$: we can connect vertices $$$4$$$ and $$$1$$$, since $$$|a_4 - a_1| = |13 - 99| = |-86| = 86$$$, and $$$86$$$ is divisible by $$$1$$$.

- Second operation $$$(x = 2)$$$: we can connect vertices $$$2$$$ and $$$1$$$, since $$$|a_2 - a_1| = |7 - 99| = |-92| = 92$$$, and $$$92$$$ is divisible by $$$2$$$.

- Third operation $$$(x = 3)$$$: we can connect vertices $$$3$$$ and $$$2$$$, since $$$|a_3 - a_2| = |1 - 7| = |-6| = 6$$$, and $$$6$$$ is divisible by $$$3$$$.

Buggy Code:
#include <bits/stdc++.h>
// #pragma GCC optimize(3)
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#define F first
#define S second
#define endl '\n'
#define bpc(x) __builtin_popcount(x)
#define bpcll(x) __builtin_popcountll(x)

using namespace std;
using ll = long long;
using i128 = __int128;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

const ll Inf = 1e18;
const int inf = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const int N = 2e5 + 5;

void solve(){
    int n; cin >> n;
    vector<int> a(n+1);
    for(int i=1; i<=n; i++) cin >> a[i];

    if(n == 1){
        cout << "YES\n";
        return;
    }
    if(n == 2){
        cout << "YES\n";
        cout << 1 << " " << 2 << endl;
        return;
    }

    vector<vector<int>> val(n, vector<int>(n+1));
    vector<multiset<pii>> st(n);
    for(int i=1; i<n; i++){
        for(int j=1; j<=n; j++){
            val[i][j] = a[j] % i;
            if(j < n) st[i].insert({val[i][j], j});
        }
    }

    vector<pii> ans(n+1, {-1, -1});
    for(int i=n; i>=2; i--){
        for(int j=n-1; j>=1; j--){
            if(ans[j].F > -1) continue;
            auto it = st[j].lower_bound({val[j][i], -1});
            // if(i == 3){
            //     cout << "j=" << j << endl;
            // }
            if(it == st[j].end() || it->F != val[j][i]) continue;
            // cout << "find " << it->S << " " << i << endl;
            ans[j] = {it->S, i};
            break;
        }
        for(int j=1; j<n; j++){
            st[j].erase(st[j].find({val[j][i-1], i-1}));
        }
    }

    cout << "YES\n";
    for(int i=1; i<n; i++){
        cout << ans[i].F << " " << ans[i].S << endl;
    }

}

int main(){
    ios::sync_with_stdio(0); cin.tie(0);
    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);

    int t = 1;
    cin >> t;
    while(t--){
        solve();
    }

    return 0;
}

**Instructions:**
- Focus on edge cases or scenarios that maximize the failure probability in faulty solutions.
- Due to the output length limit, you should generate a **small-scale** test input that is **complete and valid**.
- Output the test input directly, not code to generate it.

**Output format:**
```plaintext
{test input}
```

Think step by step.

Response:
```plaintext
1
3
1 2 3
```