**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: New Rating
time_limit_ms: 2000
memory_limit_mb: 512
Description: Hello, Codeforces Forcescode!

Kevin used to be a participant of Codeforces. Recently, the KDOI Team has developed a new Online Judge called Forcescode.

Kevin has participated in $n$ contests on Forcescode. In the $i$-th contest, his performance rating is $a_i$.

Now he has hacked into the backend of Forcescode and will select an interval $[l,r]$ ($1\le l\le r\le n$), then skip all of the contests in this interval. After that, his rating will be recalculated in the following way:

  * Initially, his rating is $x=0$;    * For each $1\le i\le n$, after the $i$-th contest,      * If $l\le i\le r$, this contest will be skipped, and the rating will remain unchanged;      * Otherwise, his rating will be updated according to the following rules:        * If $a_i>x$, his rating $x$ will increase by $1$;        * If $a_i=x$, his rating $x$ will remain unchanged;        * If $a_i<x$, his rating $x$ will decrease by $1$.

You have to help Kevin to find his maximum possible rating after the recalculation if he chooses the interval $[l,r]$ optimally. Note that Kevin has to skip at least one contest.

Input: Each test contains multiple test cases. The first line of the input contains a single integer $t$ ($1\le t\le 5\cdot 10^4$) — the number of test cases. The description of test cases follows.

The first line of each test case contains a single integer $n$ ($1\le n\le 3\cdot 10^5$) — the number of contests.

The second line contains $n$ integers $a_1,a_2,\ldots,a_n$ ($1\le a_i\le n$) — the performance ratings in the contests.

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

Output: For each test case, output a single integer — the maximum possible rating after the recalculation if Kevin chooses the interval optimally.

Examples:
input:
5
6
1 2 3 4 5 6
7
1 2 1 1 1 3 4
1
1
9
9 9 8 2 4 4 3 5 3
10
1 2 3 4 1 3 2 1 1 10
output:
5
4
0
4
5

Note: In the first test case, Kevin must skip at least one contest. If he chooses any interval of length $1$, his rating after the recalculation will be equal to $5$.

In the second test case, Kevin's optimal choice is to select the interval $[3,5]$. During the recalculation, his rating changes as follows:

$$ 0 \xrightarrow{a_1=1} 1 \xrightarrow{a_2=2} 2 \xrightarrow{\mathtt{skip}} 2 \xrightarrow{\mathtt{skip}} 2 \xrightarrow{\mathtt{skip}} 2 \xrightarrow{a_6=3} 3 \xrightarrow{a_7=4} 4 $$

In the third test case, Kevin must skip the only contest, so his rating will remain at the initial value of $0$.

In the fourth test case, Kevin's optimal choice is to select the interval $[7,9]$. During the recalculation, his rating changes as follows:

$$ 0 \xrightarrow{a_1=9} 1 \xrightarrow{a_2=9} 2 \xrightarrow{a_3=8} 3 \xrightarrow{a_4=2} 2 \xrightarrow{a_5=4} 3 \xrightarrow{a_6=4} 4 \xrightarrow{\mathtt{skip}} 4 \xrightarrow{\mathtt{skip}} 4 \xrightarrow{\mathtt{skip}} 4 $$

In the fifth test case, Kevin's optimal choice is to select the interval $[5,9]$.

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

int len(int index, int n, vector<int> a, int x)
{
    int lenth=1;
    for (int i=index+1; i<n; i++)
    {
        if (a[i]<=x)
        {
            lenth++;
        }
        else {break;}
    }
    return lenth;
}

int f(int index, int n, vector<int> a, vector<int> dp, int x, int c, int key)
{
    if (index==n)
    {
        return x;
    }
    for (int i=index+c; i<n; i++)
    {
        if (a[i]>x)
        {
            x++;
        }
        else if (a[i]<=x)
        {
            if (key)
            {
                c = len(i, n, a,x);
                dp.push_back(f(i, n, a, dp, x, c, 0));
            }
            if (a[i]<x) {x--;}
        }
    }

    int maxi = x;
    if (dp.size()==0) {maxi--;}
    if (key)
    {
        for (int i=0; i<dp.size(); i++)
        {
            maxi = max(maxi, dp[i]);
        }
        return maxi;
    }
    else
    {
        return x;
    }
}

int32_t main ()
{
    int t; cin >> t;
    while (t--)
    {
        int n; cin >> n;
        vector<int> a(n);
        vector<int> dp;

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

        cout << f(0,n,a,dp,0,0,1) << endl;
    }
    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
5
6
1 2 3 4 5 6
7
1 2 1 1 1 3 4
1
1
9
9 9 8 2 4 4 3 5 3
10
1 2 3 4 1 3 2 1 1 10
```


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: New Rating
time_limit_ms: 2000
memory_limit_mb: 512
Description: Hello, Codeforces Forcescode!

Kevin used to be a participant of Codeforces. Recently, the KDOI Team has developed a new Online Judge called Forcescode.

Kevin has participated in $n$ contests on Forcescode. In the $i$-th contest, his performance rating is $a_i$.

Now he has hacked into the backend of Forcescode and will select an interval $[l,r]$ ($1\le l\le r\le n$), then skip all of the contests in this interval. After that, his rating will be recalculated in the following way:

  * Initially, his rating is $x=0$;    * For each $1\le i\le n$, after the $i$-th contest,      * If $l\le i\le r$, this contest will be skipped, and the rating will remain unchanged;      * Otherwise, his rating will be updated according to the following rules:        * If $a_i>x$, his rating $x$ will increase by $1$;        * If $a_i=x$, his rating $x$ will remain unchanged;        * If $a_i<x$, his rating $x$ will decrease by $1$.

You have to help Kevin to find his maximum possible rating after the recalculation if he chooses the interval $[l,r]$ optimally. Note that Kevin has to skip at least one contest.

Input: Each test contains multiple test cases. The first line of the input contains a single integer $t$ ($1\le t\le 5\cdot 10^4$) — the number of test cases. The description of test cases follows.

The first line of each test case contains a single integer $n$ ($1\le n\le 3\cdot 10^5$) — the number of contests.

The second line contains $n$ integers $a_1,a_2,\ldots,a_n$ ($1\le a_i\le n$) — the performance ratings in the contests.

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

Output: For each test case, output a single integer — the maximum possible rating after the recalculation if Kevin chooses the interval optimally.

Examples:
input:
5
6
1 2 3 4 5 6
7
1 2 1 1 1 3 4
1
1
9
9 9 8 2 4 4 3 5 3
10
1 2 3 4 1 3 2 1 1 10
output:
5
4
0
4
5

Note: In the first test case, Kevin must skip at least one contest. If he chooses any interval of length $1$, his rating after the recalculation will be equal to $5$.

In the second test case, Kevin's optimal choice is to select the interval $[3,5]$. During the recalculation, his rating changes as follows:

$$ 0 \xrightarrow{a_1=1} 1 \xrightarrow{a_2=2} 2 \xrightarrow{\mathtt{skip}} 2 \xrightarrow{\mathtt{skip}} 2 \xrightarrow{\mathtt{skip}} 2 \xrightarrow{a_6=3} 3 \xrightarrow{a_7=4} 4 $$

In the third test case, Kevin must skip the only contest, so his rating will remain at the initial value of $0$.

In the fourth test case, Kevin's optimal choice is to select the interval $[7,9]$. During the recalculation, his rating changes as follows:

$$ 0 \xrightarrow{a_1=9} 1 \xrightarrow{a_2=9} 2 \xrightarrow{a_3=8} 3 \xrightarrow{a_4=2} 2 \xrightarrow{a_5=4} 3 \xrightarrow{a_6=4} 4 \xrightarrow{\mathtt{skip}} 4 \xrightarrow{\mathtt{skip}} 4 \xrightarrow{\mathtt{skip}} 4 $$

In the fifth test case, Kevin's optimal choice is to select the interval $[5,9]$.

Buggy Code:
import java.io.*;
import java.util.*;
public class ques3 {
    private static final int mod = 1000000007;
    // Custom class to hold pairs
    static class Pair {
        int value;
        int index;
        Pair(int value, int index) {
            this.value = value;
            this.index = index;
        }
    }
    // Euclidean algorithm for finding GCD for int type
    public static int gcdInt(int a, int b) {
        while (b != 0) {
            int temp = b;
            b = a % b;
            a = temp;
        }
       return a;
    }
    // Euclidean algorithm for finding GCD for long type
    public static long gcdLong(long a, long b) {
        while (b != 0) {
            long temp = b;
            b = a % b;
            a = temp;
        }
       return a;
    }
    // Binary exponentiation for int type
    public static int power_Int(int base, int exponent) {
        int result = 1;
        while (exponent > 0) {
           if ((exponent & 1) == 1) {
               result *= base;
           }
            base *= base;
            exponent >>= 1;
        }
        return result;
    }
    // Binary exponentiation for long type
    public static long power_Long(long base, long exponent) {
        long result = 1;
        while (exponent > 0) {
           if ((exponent & 1) == 1) {
               result *= base;
           }
            base *= base;
            exponent >>= 1;
        }
        return result;
    }
    // Modular exponentiation for int type with MOD = 1e9 + 7
    public static int power_modInt(int base, int exponent) {
       int result = 1;
       base %= mod;
       while (exponent > 0) {
           if ((exponent & 1) == 1) {
           result = (int) ((result * (long) base) % mod);
           }
           base = (int) ((base * (long) base) % mod);
           exponent >>= 1;
           }
           return result;
       }
    // greater than or equal to key
    public static long long_lowerBound(long[] arr, long key) {
        long low = 0, high = arr.length - 1;
        long ans = arr.length;
        while (low <= high) {
            long mid = (low + high) / 2;
            if (arr[(int)mid] >= key) {
                ans = mid;
                high = mid - 1;
            } else {
                low = mid + 1;
            }
        }
        return ans;
    }
    // greater than or equal to key
    public static long long_upperBound(long[] arr, long key) {
        long low = 0, high = arr.length - 1;
        long ans = arr.length;
        while (low <= high) {
            long mid = (low + high) / 2;
            if (arr[(int)mid] > key) {
                ans = mid;
                high = mid - 1;
            } else {
                low = mid + 1;
            }
        }
        return ans;
    }
    // greater than equal to key
    public static int int_lowerBound(int[] arr, int key) {
        int low = 0, high = arr.length - 1;
        int ans = arr.length;
        while (low <= high) {
            int mid = (low + high) / 2;
            if (arr[mid] >= key) {
                ans = mid;
                high = mid - 1;
            } else {
                low = mid + 1;
            }
        }
        return ans;
    }
    // greater than key
    public static int int_upperBound(int[] arr, int key) {
        int low = 0, high = arr.length - 1;
        int ans = arr.length;
        while (low <= high) {
            int mid = (low + high) / 2;
            if (arr[mid] > key) {
                ans = mid;
                high = mid - 1;
            } else {
                low = mid + 1;
            }
        }
        return ans;
    }
    public static int modInverse(int a) {
        return power_modInt(a, mod - 2);
    }
    public static int nCr(int n, int r, int[] fact) {
        if (r > n) return 0;
        return (int) ((fact[n] * (long) modInverse((int) ((fact[r] * (long) fact[n - r]) % mod))) % mod);
    }
    // solve
    public static void main(String args[]) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);
        String test = br.readLine();
        int t = Integer.parseInt(test);
        while (t-- > 0) {
            String[] nk = br.readLine().split(" ");
            int n = Integer.parseInt(nk[0]);
            String[] s = br.readLine().split(" ");
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = Integer.parseInt(s[i]);
            }
            int val = 1;
            int i = 1;
            for (i = 1; i < n; i++) {
                if(a[i]<val){
                    break;
                }else if(a[i]>val){
                    val++;
                }
            }
            if(i==n){
                if(val<n){
                    out.println(val);
                }else{
                    out.println(val-1);
                }
            }else{
                int max = val;
                for(; i<n; i++){
                    if(a[i]>val){
                        int val1 = val;
                        while(i<n){
                            if(a[i]>val1){
                                val1++;
                            }else if(a[i]<val1){
                                val1--;
                            }
                            if(val1<=val){
                                break;
                            }
                            i++;
                        }
                        max = Math.max(val1,max);
                    }
                }
                int val1 = 1;
                int ind = 1;
                int max1 = 1;
                for (i = 1; i < n; i++) {
                    if(a[i]<val1){
                        val1--;
                    }else if(a[i]>val1){
                        val1++;
                    }
                    if(max1<=val1){
                        max1=val1;
                        ind = i;
                    }
                }
                val = max1;
                for(i=ind+1; i<n; i++){
                    if(a[i]>val){
                        val1 = val;
                        while(i<n){
                            if(a[i]>val1){
                                val1++;
                            }else if(a[i]<val1){
                                val1--;
                            }
                            if(val1<=val){
                                break;
                            }
                            i++;
                        }
                        max1 = Math.max(val1,max1);
                    }
                }
                out.println(Math.max(max, max1));
            }

        }
        out.flush();
        out.close();
        br.close();
    }
}

**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
5
6
1 2 3 4 5 6
7
1 2 1 1 1 3 4
1
1
9
9 9 8 2 4 4 3 5 3
10
1 2 3 4 1 3 2 1 1 10
```


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: New Rating
time_limit_ms: 2000
memory_limit_mb: 512
Description: Hello, Codeforces Forcescode!

Kevin used to be a participant of Codeforces. Recently, the KDOI Team has developed a new Online Judge called Forcescode.

Kevin has participated in $n$ contests on Forcescode. In the $i$-th contest, his performance rating is $a_i$.

Now he has hacked into the backend of Forcescode and will select an interval $[l,r]$ ($1\le l\le r\le n$), then skip all of the contests in this interval. After that, his rating will be recalculated in the following way:

  * Initially, his rating is $x=0$;    * For each $1\le i\le n$, after the $i$-th contest,      * If $l\le i\le r$, this contest will be skipped, and the rating will remain unchanged;      * Otherwise, his rating will be updated according to the following rules:        * If $a_i>x$, his rating $x$ will increase by $1$;        * If $a_i=x$, his rating $x$ will remain unchanged;        * If $a_i<x$, his rating $x$ will decrease by $1$.

You have to help Kevin to find his maximum possible rating after the recalculation if he chooses the interval $[l,r]$ optimally. Note that Kevin has to skip at least one contest.

Input: Each test contains multiple test cases. The first line of the input contains a single integer $t$ ($1\le t\le 5\cdot 10^4$) — the number of test cases. The description of test cases follows.

The first line of each test case contains a single integer $n$ ($1\le n\le 3\cdot 10^5$) — the number of contests.

The second line contains $n$ integers $a_1,a_2,\ldots,a_n$ ($1\le a_i\le n$) — the performance ratings in the contests.

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

Output: For each test case, output a single integer — the maximum possible rating after the recalculation if Kevin chooses the interval optimally.

Examples:
input:
5
6
1 2 3 4 5 6
7
1 2 1 1 1 3 4
1
1
9
9 9 8 2 4 4 3 5 3
10
1 2 3 4 1 3 2 1 1 10
output:
5
4
0
4
5

Note: In the first test case, Kevin must skip at least one contest. If he chooses any interval of length $1$, his rating after the recalculation will be equal to $5$.

In the second test case, Kevin's optimal choice is to select the interval $[3,5]$. During the recalculation, his rating changes as follows:

$$ 0 \xrightarrow{a_1=1} 1 \xrightarrow{a_2=2} 2 \xrightarrow{\mathtt{skip}} 2 \xrightarrow{\mathtt{skip}} 2 \xrightarrow{\mathtt{skip}} 2 \xrightarrow{a_6=3} 3 \xrightarrow{a_7=4} 4 $$

In the third test case, Kevin must skip the only contest, so his rating will remain at the initial value of $0$.

In the fourth test case, Kevin's optimal choice is to select the interval $[7,9]$. During the recalculation, his rating changes as follows:

$$ 0 \xrightarrow{a_1=9} 1 \xrightarrow{a_2=9} 2 \xrightarrow{a_3=8} 3 \xrightarrow{a_4=2} 2 \xrightarrow{a_5=4} 3 \xrightarrow{a_6=4} 4 \xrightarrow{\mathtt{skip}} 4 \xrightarrow{\mathtt{skip}} 4 \xrightarrow{\mathtt{skip}} 4 $$

In the fifth test case, Kevin's optimal choice is to select the interval $[5,9]$.

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

public class NewRating {
    static class FastReader{
        BufferedReader br;
        StringTokenizer st;
        public FastReader(){
            br=new BufferedReader(new InputStreamReader(System.in));
        }
        String next(){
            while(st==null || !st.hasMoreTokens()){
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        int nextInt(){
            return Integer.parseInt(next());
        }
        long nextLong(){
            return Long.parseLong(next());
        }
        double nextDouble(){
            return Double.parseDouble(next());
        }
        String nextLine(){
            String str="";
            try {
                str=br.readLine().trim();
            } catch (Exception e) {
                e.printStackTrace();
            }
            return str;
        }
    }
    static class FastWriter {
        private final BufferedWriter bw;

        public FastWriter() {
            this.bw = new BufferedWriter(new OutputStreamWriter(System.out));
        }

        public void print(Object object) throws IOException {
            bw.append("" + object);
        }

        public void println(Object object) throws IOException {
            print(object);
            bw.append("\n");
        }

        public void close() throws IOException {
            bw.close();
        }
    }

    public static void main(String[] args) {
        try {
            FastReader in=new FastReader();
            FastWriter out = new FastWriter();
            StringBuilder fin_ans =  new StringBuilder();
            int t = in.nextInt();
            while (t-- > 0){
                int n = in.nextInt();
                int[] arr = new int[n];
                for (int i = 0; i < n; i++) arr[i] = in.nextInt();
                if (getSmaller(arr) == -1){
                    fin_ans.append(n-1).append("\n");
                    continue;
                }

                int curr = 1, ans = 1;
                for (int i = 1; i < n; i++){
                    if (arr[i] > curr) curr++;
                    else if (arr[i] < curr){
                        if (ans == curr) ans += getVal(arr,i,curr);
                        curr--;
                    }
                    ans = Math.max(ans,curr);
                }
                fin_ans.append(ans).append("\n");
            }
            out.print(fin_ans);
            out.close();
        } catch (Exception e) {
            return;
        }
    }

    private static int getVal(int[] arr, int ind, int ans){
        int curr = 0;
        for (int i = ind; i < arr.length; i++){
            if (arr[i] > (ans+curr)) curr++;
            else if (arr[i] < (ans+curr)) curr--;
            if (curr < 0) curr = 0;
        }
        return curr;
    }

    private static int getSmaller(int[] arr){
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] <= i) return i;
        }
        return -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
5
6
1 2 3 4 5 6
7
1 2 1 1 1 3 4
1
1
9
9 9 8 2 4 4 3 5 3
10
1 2 3 4 1 3 2 1 1 10
```


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Transfusion
time_limit_ms: 2000
memory_limit_mb: 256
Description: You are given an array $$$a$$$ of length $$$n$$$. In one operation, you can pick an index $$$i$$$ from $$$2$$$ to $$$n-1$$$ inclusive, and do one of the following actions:

- Decrease $$$a_{i-1}$$$ by $$$1$$$, then increase $$$a_{i+1}$$$ by $$$1$$$.
- Decrease $$$a_{i+1}$$$ by $$$1$$$, then increase $$$a_{i-1}$$$ by $$$1$$$.

After each operation, all the values must be non-negative. Can you make all the elements equal after any number of operations?

Input: First line of input consists of one integer $$$t$$$ ($$$1 \le t \le 10^4$$$)  — the number of test cases.

First line of each test case consists of one integer $$$n$$$ ($$$3 \le n \le 2\cdot 10^5$$$).

Second line of each test case consists of $$$n$$$ integers $$$a_i$$$ ($$$1 \le a_i \le 10^9$$$).

It is guaranteed that the sum of $$$n$$$ of all test cases doesn't exceed $$$2\cdot 10^5$$$.

Output: For each test case, print "YES" without quotation marks if it is possible to make all the elements equal after any number of operations; otherwise, print "NO" without quotation marks.

You can print answers in any register: "yes", "YeS", "nO"  — will also be considered correct.

Examples:
input:
8
3
3 2 1
3
1 1 3
4
1 2 5 4
4
1 6 6 1
5
6 2 1 4 2
4
1 4 2 1
5
3 1 2 1 3
3
2 4 2
output:
YES
NO
YES
NO
YES
NO
NO
NO

Note:

Buggy Code:
//#include<bits/stdc++.h>
#include<iostream>
#include<vector>
#include<queue>
#include <algorithm>
#include<string>
using namespace std;
const int N = 2e5 + 5;
int a[N];
int d[N];
int  n, m;
int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int t; cin >> t;
	while (t--) {
		cin >> n;
		int sum_1 = 0, sum_2 = 0, sum = 0;
		for (int i = 1; i <= n; i++) {
			cin >> a[i];
			if (i % 2 == 1)
				sum_1 += a[i];
			else sum_2 += a[i];
			sum += a[i];
		}
		if (sum % n != 0) { cout << "no" << endl; continue; }
		if(sum_1%(n/2+n%2)!=0) { cout << "no" << endl; continue; }
		if (sum_2 % (n / 2) != 0) { cout << "no" << endl; continue; }
		cout << "yes" << endl;
	}
}

**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 given code, let's analyze the logic and identify potential edge cases:

### Analysis of the Code:
1. **Sum Check**:
   - The code checks if the total sum of the array is divisible by `n`. This is a necessary condition for the elements to be equal after the operations.
2. **Odd and Even Sums**:
   - The code also checks if the sum of elements at odd indices (`sum_1`) and even indices (`sum_2`) are divisible by `n/2` and `n/2 + n%2` respectively. This is where the bug might be.

### Potential Bugs:
- The code assumes that the sum of elements at odd and even indices must be divisible by `n/2` and `n/2 + n%2` respectively. This is not always correct. For example, if `n` is odd, the sum of elements at odd indices should be divisible by `(n+1)/2` and the sum of elements at even indices should be divisible by `n/2`.

### Challenging Test Input:
- We need a test case where `n` is odd and the sum of elements at odd indices is not divisible by `(n+1)/2`, but the total sum is divisible by `n`.

### Test Input:
```plaintext
1
5
1 2 3 4 5
```

### Explanation:
- **Array**: `[1, 2, 3, 4, 5]`
- **Total Sum**: `1 + 2 + 3 + 4 + 5 = 15`
- **Sum of Odd Indices**: `1 + 3 + 5 = 9`
- **Sum of Even Indices**: `2 + 4 = 6`
- **Check**:
  - `15 % 5 == 0` (Total sum is divisible by `n`)
  - `9 % 3 == 0` (Sum of odd indices is divisible by `(n+1)/2 = 3`)
  - `6 % 2 == 0` (Sum of even indices is divisible by `n/2 = 2`)

This test case should expose the bug because the code incorrectly checks the divisibility of the sums of odd and even indices. The correct condition for an odd `n` should be:
- `sum_1 % ((n+1)/2) == 0`
- `sum_2 % (n/2) == 0`

By providing this test input, we can ensure that the code fails to handle the correct divisibility conditions for odd `n`.


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Transfusion
time_limit_ms: 2000
memory_limit_mb: 256
Description: You are given an array $$$a$$$ of length $$$n$$$. In one operation, you can pick an index $$$i$$$ from $$$2$$$ to $$$n-1$$$ inclusive, and do one of the following actions:

- Decrease $$$a_{i-1}$$$ by $$$1$$$, then increase $$$a_{i+1}$$$ by $$$1$$$.
- Decrease $$$a_{i+1}$$$ by $$$1$$$, then increase $$$a_{i-1}$$$ by $$$1$$$.

After each operation, all the values must be non-negative. Can you make all the elements equal after any number of operations?

Input: First line of input consists of one integer $$$t$$$ ($$$1 \le t \le 10^4$$$)  — the number of test cases.

First line of each test case consists of one integer $$$n$$$ ($$$3 \le n \le 2\cdot 10^5$$$).

Second line of each test case consists of $$$n$$$ integers $$$a_i$$$ ($$$1 \le a_i \le 10^9$$$).

It is guaranteed that the sum of $$$n$$$ of all test cases doesn't exceed $$$2\cdot 10^5$$$.

Output: For each test case, print "YES" without quotation marks if it is possible to make all the elements equal after any number of operations; otherwise, print "NO" without quotation marks.

You can print answers in any register: "yes", "YeS", "nO"  — will also be considered correct.

Examples:
input:
8
3
3 2 1
3
1 1 3
4
1 2 5 4
4
1 6 6 1
5
6 2 1 4 2
4
1 4 2 1
5
3 1 2 1 3
3
2 4 2
output:
YES
NO
YES
NO
YES
NO
NO
NO

Note:

Buggy Code:
#include<iostream>
using namespace std;

int main(){

    int ttt;
    cin>>ttt;
    const int t = ttt;
    long long n;
    for(long long tt=0 ; tt < t ;  tt++){
        cin>>n;
        long long arr[n];
        long long minn = 1e18 ,maxx = -1 , mid;

        for(int i =0 ; i< n;++i){
            cin>>arr[i];
            if(arr[i] > maxx){
                maxx=arr[i];
            }
            if(arr[i]< minn){
                minn=arr[i];
            }
        }
        mid = ( maxx + minn )/2  ;
        bool flag = true;

        for(int i = 1 ;i< n ; ){
            ///end
            if ( i == n-1){
                if(arr[i] != mid || arr[i-1] != mid){
                    flag =false;
                }
                i++;
            }
            ///
            if(arr[i-1]==mid){
                i++;
                continue;
            }
            if(arr[i-1] < mid){
                arr[i-1]++;
                arr[i+1]--;
                if(arr[i+1] < 0 ){
                    flag=false;
                    break;
                }
            }
            if (arr[i-1] > mid){
                arr[i-1]--;
                arr[i+1]++;
                if(arr[i-1]<0 ){
                    flag =false;
                    break;
                }
            }
        }
        if(flag == true){
            cout<<"YES"<<'\n';
        }else{
            cout<<"NO"<<'\n';
        }
    }
    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 code, we need to consider the following aspects:

1. **Edge Cases**: Test cases where the array has extreme values or specific patterns.
2. **Non-Uniform Distribution**: Arrays where the values are not uniformly distributed, making it difficult to balance the elements.
3. **Large Values**: Arrays with very large values to test the limits of the algorithm.
4. **Specific Patterns**: Arrays that have specific patterns that might cause the algorithm to fail.

Given the code, the main issue seems to be in the logic for balancing the array elements. The code attempts to balance the array by moving values between adjacent elements, but it does not correctly handle cases where the array cannot be balanced.

Let's consider a test case that exposes this issue:

### Test Case
- **Input**: An array where the values are such that it is impossible to balance all elements to the same value using the allowed operations.

### Example
```plaintext
1
4
1 1 1 4
```

### Explanation
- **Array**: `[1, 1, 1, 4]`
- **Operations**:
  - We cannot decrease any element without making it negative.
  - We cannot increase any element without exceeding the allowed operations.

This test case is designed to show that the array cannot be balanced to have all elements equal, and the code should output "NO".

### Output
```plaintext
NO
```

This test case is small-scale, complete, and valid, and it should expose the bug in the provided code.


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Transfusion
time_limit_ms: 2000
memory_limit_mb: 256
Description: You are given an array $$$a$$$ of length $$$n$$$. In one operation, you can pick an index $$$i$$$ from $$$2$$$ to $$$n-1$$$ inclusive, and do one of the following actions:

- Decrease $$$a_{i-1}$$$ by $$$1$$$, then increase $$$a_{i+1}$$$ by $$$1$$$.
- Decrease $$$a_{i+1}$$$ by $$$1$$$, then increase $$$a_{i-1}$$$ by $$$1$$$.

After each operation, all the values must be non-negative. Can you make all the elements equal after any number of operations?

Input: First line of input consists of one integer $$$t$$$ ($$$1 \le t \le 10^4$$$)  — the number of test cases.

First line of each test case consists of one integer $$$n$$$ ($$$3 \le n \le 2\cdot 10^5$$$).

Second line of each test case consists of $$$n$$$ integers $$$a_i$$$ ($$$1 \le a_i \le 10^9$$$).

It is guaranteed that the sum of $$$n$$$ of all test cases doesn't exceed $$$2\cdot 10^5$$$.

Output: For each test case, print "YES" without quotation marks if it is possible to make all the elements equal after any number of operations; otherwise, print "NO" without quotation marks.

You can print answers in any register: "yes", "YeS", "nO"  — will also be considered correct.

Examples:
input:
8
3
3 2 1
3
1 1 3
4
1 2 5 4
4
1 6 6 1
5
6 2 1 4 2
4
1 4 2 1
5
3 1 2 1 3
3
2 4 2
output:
YES
NO
YES
NO
YES
NO
NO
NO

Note:

Buggy Code:
#include <iostream>
#include <vector>
using namespace std;
int main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    int T; cin >> T;
    int N;
    for (int k = 0; k < T; k++){
        cin >> N;
        vector<int> a(N, 0);
        int sum1 = 0, sum2 = 0, coun1 = 0, coun2 = 0;
        for (int i = 0; i < N; i++){
            cin >> a[i];
            if (i % 2 == 0){sum1 += a[i]; coun1++;}
            else {sum2 += a[i]; coun2++;}
        }
        if ( (sum1 + sum2) % N != 0 || sum1 % coun1 != 0 || sum2 % coun2 != 0){cout << "NO" << '\n'; continue;}
        int sr = (sum1 + sum2) / N;
        int ma = max(sum1, sum2);
        int mi = min(sum1, sum2);
        if (N % 2 == 0){
            if (sum1 / coun1 == sum2 / coun2){ cout << "YES" << '\n'; continue;}
            else { cout << "NO" << '\n'; continue; }
        }
        else{
            if ( ma - sr == mi){cout << "YES" << '\n'; continue;}
            else { cout << "NO" << '\n'; continue; }
        }
    }
    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
4
1 3 3 1
```


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Transfusion
time_limit_ms: 2000
memory_limit_mb: 256
Description: You are given an array $$$a$$$ of length $$$n$$$. In one operation, you can pick an index $$$i$$$ from $$$2$$$ to $$$n-1$$$ inclusive, and do one of the following actions:

- Decrease $$$a_{i-1}$$$ by $$$1$$$, then increase $$$a_{i+1}$$$ by $$$1$$$.
- Decrease $$$a_{i+1}$$$ by $$$1$$$, then increase $$$a_{i-1}$$$ by $$$1$$$.

After each operation, all the values must be non-negative. Can you make all the elements equal after any number of operations?

Input: First line of input consists of one integer $$$t$$$ ($$$1 \le t \le 10^4$$$)  — the number of test cases.

First line of each test case consists of one integer $$$n$$$ ($$$3 \le n \le 2\cdot 10^5$$$).

Second line of each test case consists of $$$n$$$ integers $$$a_i$$$ ($$$1 \le a_i \le 10^9$$$).

It is guaranteed that the sum of $$$n$$$ of all test cases doesn't exceed $$$2\cdot 10^5$$$.

Output: For each test case, print "YES" without quotation marks if it is possible to make all the elements equal after any number of operations; otherwise, print "NO" without quotation marks.

You can print answers in any register: "yes", "YeS", "nO"  — will also be considered correct.

Examples:
input:
8
3
3 2 1
3
1 1 3
4
1 2 5 4
4
1 6 6 1
5
6 2 1 4 2
4
1 4 2 1
5
3 1 2 1 3
3
2 4 2
output:
YES
NO
YES
NO
YES
NO
NO
NO

Note:

Buggy Code:
def count_even_odd_differences(arr):
    differences = []

    for i in range(len(arr) - 2):
        diff = abs(arr[i] - arr[i + 2])
        differences.append(diff)

    even_count = 0
    odd_count = 0

    for diff in differences:
        if diff % 2 == 0 and diff!=0:
            even_count += 1
        else:
            odd_count += 1

    if abs(odd_count - even_count) == 1 or even_count > odd_count:
        return True

    return False

n = int(input())

for i in range(n):
    l = int(input())
    numbers = list(map(int, input().split()))

    total = sum(numbers)

    if total % l != 0:
        print("NO")
    else:
        if count_even_odd_differences(numbers):
            print("YES")
        else:
            print("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:
To generate a challenging test input that exposes the bug in the provided buggy code, let's analyze the problem and the code:

1. **Problem Understanding:**
   - We need to determine if we can make all elements of the array equal using the given operations.
   - The key condition is that the sum of the array elements must be divisible by the length of the array for it to be possible to make all elements equal.

2. **Buggy Code Analysis:**
   - The function `count_even_odd_differences` is intended to count the differences between elements at positions `i` and `i+2`.
   - The code checks if the absolute difference between these elements is even or odd and then uses this count to determine if the array can be made equal.
   - However, this approach is fundamentally flawed because the differences between elements at positions `i` and `i+2` do not directly determine if the array can be made equal.

3. **Edge Cases:**
   - **Case 1:** All elements are already equal.
   - **Case 2:** The sum of the array is not divisible by the length of the array.
   - **Case 3:** The sum of the array is divisible by the length of the array, but the elements cannot be made equal due to the nature of the operations.

4. **Challenging Test Input:**
   - We need a test case where the sum of the array is divisible by the length of the array, but the elements cannot be made equal due to the constraints of the operations.

Let's generate a test input that fits this criteria:

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

### Explanation:
- **Test Case:**
  - `n = 5`
  - `a = [1, 2, 3, 4, 5]`
- **Sum of the array:**
  - `1 + 2 + 3 + 4 + 5 = 15`
- **Length of the array:**
  - `5`
- **Sum divided by length:**
  - `15 / 5 = 3` (which is an integer, so the sum is divisible by the length)
- **Can elements be made equal?**
  - No, because the operations can only transfer values between adjacent elements, and there is no way to balance the differences to make all elements equal to 3.

This test input should expose the bug in the buggy code because it will incorrectly determine that the array can be made equal.


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Transfusion
time_limit_ms: 2000
memory_limit_mb: 256
Description: You are given an array $$$a$$$ of length $$$n$$$. In one operation, you can pick an index $$$i$$$ from $$$2$$$ to $$$n-1$$$ inclusive, and do one of the following actions:

- Decrease $$$a_{i-1}$$$ by $$$1$$$, then increase $$$a_{i+1}$$$ by $$$1$$$.
- Decrease $$$a_{i+1}$$$ by $$$1$$$, then increase $$$a_{i-1}$$$ by $$$1$$$.

After each operation, all the values must be non-negative. Can you make all the elements equal after any number of operations?

Input: First line of input consists of one integer $$$t$$$ ($$$1 \le t \le 10^4$$$)  — the number of test cases.

First line of each test case consists of one integer $$$n$$$ ($$$3 \le n \le 2\cdot 10^5$$$).

Second line of each test case consists of $$$n$$$ integers $$$a_i$$$ ($$$1 \le a_i \le 10^9$$$).

It is guaranteed that the sum of $$$n$$$ of all test cases doesn't exceed $$$2\cdot 10^5$$$.

Output: For each test case, print "YES" without quotation marks if it is possible to make all the elements equal after any number of operations; otherwise, print "NO" without quotation marks.

You can print answers in any register: "yes", "YeS", "nO"  — will also be considered correct.

Examples:
input:
8
3
3 2 1
3
1 1 3
4
1 2 5 4
4
1 6 6 1
5
6 2 1 4 2
4
1 4 2 1
5
3 1 2 1 3
3
2 4 2
output:
YES
NO
YES
NO
YES
NO
NO
NO

Note:

Buggy Code:
for _ in range(int(input())):
    n = int(input())
    arr = list(map(int,input().split()))
    su = sum(arr)
    ev = 0
    ele = su//n
    for i in range(0,n,2):
        ev +=arr[i]
    od = su - ev
    if n&1:
        if  ev-od ==ele:
            print("YES")
        else:
            print('NO')
    else:
        if od==ev and od%2==0:
            print('YES')
        else:
            print('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
4
1 3 3 1
```


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Transfusion
time_limit_ms: 2000
memory_limit_mb: 256
Description: You are given an array $$$a$$$ of length $$$n$$$. In one operation, you can pick an index $$$i$$$ from $$$2$$$ to $$$n-1$$$ inclusive, and do one of the following actions:

- Decrease $$$a_{i-1}$$$ by $$$1$$$, then increase $$$a_{i+1}$$$ by $$$1$$$.
- Decrease $$$a_{i+1}$$$ by $$$1$$$, then increase $$$a_{i-1}$$$ by $$$1$$$.

After each operation, all the values must be non-negative. Can you make all the elements equal after any number of operations?

Input: First line of input consists of one integer $$$t$$$ ($$$1 \le t \le 10^4$$$)  — the number of test cases.

First line of each test case consists of one integer $$$n$$$ ($$$3 \le n \le 2\cdot 10^5$$$).

Second line of each test case consists of $$$n$$$ integers $$$a_i$$$ ($$$1 \le a_i \le 10^9$$$).

It is guaranteed that the sum of $$$n$$$ of all test cases doesn't exceed $$$2\cdot 10^5$$$.

Output: For each test case, print "YES" without quotation marks if it is possible to make all the elements equal after any number of operations; otherwise, print "NO" without quotation marks.

You can print answers in any register: "yes", "YeS", "nO"  — will also be considered correct.

Examples:
input:
8
3
3 2 1
3
1 1 3
4
1 2 5 4
4
1 6 6 1
5
6 2 1 4 2
4
1 4 2 1
5
3 1 2 1 3
3
2 4 2
output:
YES
NO
YES
NO
YES
NO
NO
NO

Note:

Buggy Code:
t = int(input())

for _ in range(t):
    n = int(input())
    global_len = 0

    list_ = list(map(int,input().split()))
    sum_ = sum(list_)

    if sum_ % n:
        print('NO')
        continue
    target_number =int(sum_ / n)

    for i in range(1, n-1):
        while list_[i-1] != target_number:
            if list_[i-1] < target_number and list_[i+1] > 0:
                list_[i-1]+=1
                list_[i+1]-=1
            elif list_[i-1] > target_number and list_[i-1] > 0:
                list_[i-1]-=1
                list_[i+1]+=1
    if list_.count(target_number) == n:
        print('YES')
    else:
        print('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
3
3
1 2 1
4
1 1 1 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: Transfusion
time_limit_ms: 2000
memory_limit_mb: 256
Description: You are given an array $$$a$$$ of length $$$n$$$. In one operation, you can pick an index $$$i$$$ from $$$2$$$ to $$$n-1$$$ inclusive, and do one of the following actions:

- Decrease $$$a_{i-1}$$$ by $$$1$$$, then increase $$$a_{i+1}$$$ by $$$1$$$.
- Decrease $$$a_{i+1}$$$ by $$$1$$$, then increase $$$a_{i-1}$$$ by $$$1$$$.

After each operation, all the values must be non-negative. Can you make all the elements equal after any number of operations?

Input: First line of input consists of one integer $$$t$$$ ($$$1 \le t \le 10^4$$$)  — the number of test cases.

First line of each test case consists of one integer $$$n$$$ ($$$3 \le n \le 2\cdot 10^5$$$).

Second line of each test case consists of $$$n$$$ integers $$$a_i$$$ ($$$1 \le a_i \le 10^9$$$).

It is guaranteed that the sum of $$$n$$$ of all test cases doesn't exceed $$$2\cdot 10^5$$$.

Output: For each test case, print "YES" without quotation marks if it is possible to make all the elements equal after any number of operations; otherwise, print "NO" without quotation marks.

You can print answers in any register: "yes", "YeS", "nO"  — will also be considered correct.

Examples:
input:
8
3
3 2 1
3
1 1 3
4
1 2 5 4
4
1 6 6 1
5
6 2 1 4 2
4
1 4 2 1
5
3 1 2 1 3
3
2 4 2
output:
YES
NO
YES
NO
YES
NO
NO
NO

Note:

Buggy Code:
import java.util.Scanner;
import java.util.regex.*;

public class RegexTest
{
    public static void main(String args[])
      {
          Scanner input=new Scanner(System.in);

             int tests=input.nextInt();
             for(int i=0;i<tests;i++)
             {
                int size=input.nextInt();

                int[] arr=new int[size];

                for(int m=0;m<size;m++)
                {
                    arr[m]=input.nextInt();
                }

                int k=1;

                while(k!=size-1)
                {
                    if(arr[k-1]<arr[k+1])
                    {
                      while(arr[k-1]<arr[k+1])
                      {
                        arr[k-1]+=1;
                        arr[k+1]-=1;
                      }
                    }
                    else if(arr[k-1]>arr[k+1])
                    {
                        while(arr[k-1]>arr[k+1])
                      {
                        arr[k-1]-=1;
                        arr[k+1]+=1;
                      }
                    }

                    k++;
                }

                int s=0;
                for(int t=1;t<size;t++)
                {
                    if(arr[t]==arr[t-1])
                    {

                    }
                    else
                    {
                      s=7;
                    }
                }

                 if(s==7)
                 {
                     System.out.println("NO");
                 }
                 else
                 {
                     System.out.println("YES");
                 }
             }

      }

}

**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
3
1 2 1
4
1 1 1 1
5
1 2 3 2 1
```


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Transfusion
time_limit_ms: 2000
memory_limit_mb: 256
Description: You are given an array $$$a$$$ of length $$$n$$$. In one operation, you can pick an index $$$i$$$ from $$$2$$$ to $$$n-1$$$ inclusive, and do one of the following actions:

- Decrease $$$a_{i-1}$$$ by $$$1$$$, then increase $$$a_{i+1}$$$ by $$$1$$$.
- Decrease $$$a_{i+1}$$$ by $$$1$$$, then increase $$$a_{i-1}$$$ by $$$1$$$.

After each operation, all the values must be non-negative. Can you make all the elements equal after any number of operations?

Input: First line of input consists of one integer $$$t$$$ ($$$1 \le t \le 10^4$$$)  — the number of test cases.

First line of each test case consists of one integer $$$n$$$ ($$$3 \le n \le 2\cdot 10^5$$$).

Second line of each test case consists of $$$n$$$ integers $$$a_i$$$ ($$$1 \le a_i \le 10^9$$$).

It is guaranteed that the sum of $$$n$$$ of all test cases doesn't exceed $$$2\cdot 10^5$$$.

Output: For each test case, print "YES" without quotation marks if it is possible to make all the elements equal after any number of operations; otherwise, print "NO" without quotation marks.

You can print answers in any register: "yes", "YeS", "nO"  — will also be considered correct.

Examples:
input:
8
3
3 2 1
3
1 1 3
4
1 2 5 4
4
1 6 6 1
5
6 2 1 4 2
4
1 4 2 1
5
3 1 2 1 3
3
2 4 2
output:
YES
NO
YES
NO
YES
NO
NO
NO

Note:

Buggy Code:
import java.util.*;
public class Transfusion{
public static void print(Object print){
System.out.print(print);
}
public static void println(Object print){
System.out.println(print);
}
public static void println(){
System.out.println();
}
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for(int l=0; l<t; l++){
    int n = sc.nextInt();
    int[] a = new int[n];
    long even=0l, odd=0l;
    for(int i=0; i<n; i++){
        a[i]=sc.nextInt();
        if(i%2==1){
            even+=(long)a[i];
        }else{
            odd+=(long)a[i];
        }
    }
    if(even%(n/2)!=0){
        println("NO");
        continue;
    }
    even/=(long)(n/2);
    if(n%2==1){
        odd/=(long)(n/2+1);
        if(odd%(long)(n/2+1)!=0){
            println("NO");
            continue;
        }
    }
    else{
        if(odd%(long)(n/2)!=0){
            println("NO");
            continue;
        }
        odd/=(long)(n/2);
    }
    if(even==odd){
        println("YES");
    }
    else
    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
3
1 2 3
```


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Transfusion
time_limit_ms: 2000
memory_limit_mb: 256
Description: You are given an array $$$a$$$ of length $$$n$$$. In one operation, you can pick an index $$$i$$$ from $$$2$$$ to $$$n-1$$$ inclusive, and do one of the following actions:

- Decrease $$$a_{i-1}$$$ by $$$1$$$, then increase $$$a_{i+1}$$$ by $$$1$$$.
- Decrease $$$a_{i+1}$$$ by $$$1$$$, then increase $$$a_{i-1}$$$ by $$$1$$$.

After each operation, all the values must be non-negative. Can you make all the elements equal after any number of operations?

Input: First line of input consists of one integer $$$t$$$ ($$$1 \le t \le 10^4$$$)  — the number of test cases.

First line of each test case consists of one integer $$$n$$$ ($$$3 \le n \le 2\cdot 10^5$$$).

Second line of each test case consists of $$$n$$$ integers $$$a_i$$$ ($$$1 \le a_i \le 10^9$$$).

It is guaranteed that the sum of $$$n$$$ of all test cases doesn't exceed $$$2\cdot 10^5$$$.

Output: For each test case, print "YES" without quotation marks if it is possible to make all the elements equal after any number of operations; otherwise, print "NO" without quotation marks.

You can print answers in any register: "yes", "YeS", "nO"  — will also be considered correct.

Examples:
input:
8
3
3 2 1
3
1 1 3
4
1 2 5 4
4
1 6 6 1
5
6 2 1 4 2
4
1 4 2 1
5
3 1 2 1 3
3
2 4 2
output:
YES
NO
YES
NO
YES
NO
NO
NO

Note:

Buggy Code:
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
typedef vector<int> vdef;
typedef set<int> sdef;
#define forab(i, a, b) for (int i = a; i < b; i++)
#define forn(i, n) for (int i = 0; i < n; i++)
using str =  string;
using ll  =  long long;
using ld  =  long double;
using vl  =  vector<ll>;
using vs  =  vector<str>;
using vpl =  vector<pair<ll,ll>>;
using sll =  set<ll>;
using pll =  pair<ll,ll>;
const int M = 998244353;
const int N = 262144;
const ld pi = 3.141592653589793238;
const ll inf = 2e18;
//binary search elements
#define lb lower_bound
#define ub upper_bound
//
ll power(ll a,ll b) {ll r=1; while(b) {if(b&1) r=(r*a)%M; a=(a*a)%M; b/=2;} return r;}
vl sieve(ll n) {vl a(n+1,1),v; a[0]=a[1]=0; forab(i,2,n+1) if(a[i]) {v.pb(i); for(ll j=2*i; j <=n; j+=i) a[j]=0;} return a;}
vl divsr(ll n) {vl a(n+1,1); forn(i,n+1) a[i]=i; forab(i,2,n+1) if(a[i]==i) {for(ll j=2*i; j<=n; j+=i) a[j]=i;} return a;}
vl fac(ll n) {vl v(n+1,1); forab(i,2,n+1) v[i] = (v[i-1]*i)%M; return v;}
//--------------------------------------------------------------------------------------------------------------------------//
//let us start the code
void solve(){
int n;
cin>>n;
int a[n];
int odd=0,even=0,s=0,s1=0,s2=0;
forn(i,n){
    cin>>a[i];
}
forn(i,n){
    s+=a[i];
}
forn(i, n) {
        if (i % 2 == 0) {
            s2 += a[i];
            even++;
        } else {
            s1 += a[i];
            odd++;
        }
    }
// cout<<k<<endl;
if(s%n==0 && s1%odd==0 && s2%even==0){
    if(s1/odd==s2/even){
         cout<<"YES"<<endl;
    }
}
else{
    cout<<"NO"<<endl;
}

}
int main() {
    #define int long long int
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int t;
    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
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: Transfusion
time_limit_ms: 2000
memory_limit_mb: 256
Description: You are given an array $$$a$$$ of length $$$n$$$. In one operation, you can pick an index $$$i$$$ from $$$2$$$ to $$$n-1$$$ inclusive, and do one of the following actions:

- Decrease $$$a_{i-1}$$$ by $$$1$$$, then increase $$$a_{i+1}$$$ by $$$1$$$.
- Decrease $$$a_{i+1}$$$ by $$$1$$$, then increase $$$a_{i-1}$$$ by $$$1$$$.

After each operation, all the values must be non-negative. Can you make all the elements equal after any number of operations?

Input: First line of input consists of one integer $$$t$$$ ($$$1 \le t \le 10^4$$$)  — the number of test cases.

First line of each test case consists of one integer $$$n$$$ ($$$3 \le n \le 2\cdot 10^5$$$).

Second line of each test case consists of $$$n$$$ integers $$$a_i$$$ ($$$1 \le a_i \le 10^9$$$).

It is guaranteed that the sum of $$$n$$$ of all test cases doesn't exceed $$$2\cdot 10^5$$$.

Output: For each test case, print "YES" without quotation marks if it is possible to make all the elements equal after any number of operations; otherwise, print "NO" without quotation marks.

You can print answers in any register: "yes", "YeS", "nO"  — will also be considered correct.

Examples:
input:
8
3
3 2 1
3
1 1 3
4
1 2 5 4
4
1 6 6 1
5
6 2 1 4 2
4
1 4 2 1
5
3 1 2 1 3
3
2 4 2
output:
YES
NO
YES
NO
YES
NO
NO
NO

Note:

Buggy Code:
t = int(input())
for _ in range(t):
    i = int(input())
    a = input()
    a = a.replace(" ", "")
    if sum(map(int, a)) % i != 0:
        print("No")
    else:

        if sum(map(int, a[::2])) % (i // 2 + 1) == 0 and  sum(map(int, a[1::2])) % (i // 2) == 0:
            print("Yes")
        else:
            print("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:
To expose the bug in the given buggy code, we need to focus on the logic that checks if the sum of the array elements can be evenly distributed among the indices. The buggy code has a flawed approach in checking the sums of even and odd indexed elements.

### Step-by-Step Analysis:
1. **Sum Check**: The code correctly checks if the total sum of the array is divisible by the length of the array. This is a necessary condition but not sufficient.
2. **Even and Odd Index Sum Check**: The code then checks if the sum of elements at even indices is divisible by `(i // 2 + 1)` and the sum of elements at odd indices is divisible by `(i // 2)`. This is where the bug lies. The correct condition should be that the sum of elements at even indices and the sum of elements at odd indices should each be divisible by `i // 2` if `i` is even, or one of them should be divisible by `i // 2` and the other by `i // 2 + 1` if `i` is odd.

### Test Input to Expose the Bug:
We need a test case where the total sum is divisible by `i`, but the sums of even and odd indexed elements do not satisfy the incorrect conditions in the buggy code.

### Example Test Input:
```plaintext
1
5
1 2 3 4 5
```

### Explanation:
- **Total Sum**: `1 + 2 + 3 + 4 + 5 = 15`
- **Length**: `5`
- **Total Sum Divisible by Length**: `15 % 5 == 0` (True)
- **Even Indexed Sum**: `1 + 3 + 5 = 9`
- **Odd Indexed Sum**: `2 + 4 = 6`
- **Even Indexed Sum Divisible by (5 // 2 + 1)**: `9 % 3 == 0` (True)
- **Odd Indexed Sum Divisible by (5 // 2)**: `6 % 2 == 0` (True)

However, the correct condition for the sums of even and odd indexed elements should be:
- **Even Indexed Sum Divisible by (5 // 2)**: `9 % 2 != 0` (False)
- **Odd Indexed Sum Divisible by (5 // 2 + 1)**: `6 % 3 == 0` (True)

Since the buggy code incorrectly checks the sums of even and odd indexed elements, it will incorrectly print "Yes" for this test case, exposing the bug.

### Final Test Input:
```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: Transfusion
time_limit_ms: 2000
memory_limit_mb: 256
Description: You are given an array $$$a$$$ of length $$$n$$$. In one operation, you can pick an index $$$i$$$ from $$$2$$$ to $$$n-1$$$ inclusive, and do one of the following actions:

- Decrease $$$a_{i-1}$$$ by $$$1$$$, then increase $$$a_{i+1}$$$ by $$$1$$$.
- Decrease $$$a_{i+1}$$$ by $$$1$$$, then increase $$$a_{i-1}$$$ by $$$1$$$.

After each operation, all the values must be non-negative. Can you make all the elements equal after any number of operations?

Input: First line of input consists of one integer $$$t$$$ ($$$1 \le t \le 10^4$$$)  — the number of test cases.

First line of each test case consists of one integer $$$n$$$ ($$$3 \le n \le 2\cdot 10^5$$$).

Second line of each test case consists of $$$n$$$ integers $$$a_i$$$ ($$$1 \le a_i \le 10^9$$$).

It is guaranteed that the sum of $$$n$$$ of all test cases doesn't exceed $$$2\cdot 10^5$$$.

Output: For each test case, print "YES" without quotation marks if it is possible to make all the elements equal after any number of operations; otherwise, print "NO" without quotation marks.

You can print answers in any register: "yes", "YeS", "nO"  — will also be considered correct.

Examples:
input:
8
3
3 2 1
3
1 1 3
4
1 2 5 4
4
1 6 6 1
5
6 2 1 4 2
4
1 4 2 1
5
3 1 2 1 3
3
2 4 2
output:
YES
NO
YES
NO
YES
NO
NO
NO

Note:

Buggy Code:
t=int(input())
for _ in range(t):
    n=int(input())
    arr=list(map(int,input().split()))
    sum_even=0
    sum_odd=0
    if (n-1)%2==0:
        n_even=(n//2)+1
        n_odd=n//2
    else:
        n_even=(n//2)+1
        n_odd=(n//2)+1
    for i in range(0,n,2):
        sum_even+=arr[i]
    for i in range(1,n,2):
        sum_odd+=arr[i]
    if sum_even%n_even==0 and sum_odd%n_odd==0 and (sum_even//n_even)==(sum_odd//n_odd):
        print('YES')
    else:
        print('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:
To expose the bug in the given code, we need to focus on edge cases that highlight the issues with the logic used in the code. The code calculates the sum of elements at even and odd indices and checks if these sums can be evenly divided by the number of even and odd indices, respectively. It then checks if the resulting values are equal.

However, this approach does not consider the actual feasibility of making all elements equal through the allowed operations. The operations can only transfer values between adjacent elements, and the code does not account for this constraint.

### Key Issues:
1. **Sum Calculation**: The code assumes that if the sums of even and odd indexed elements can be evenly divided by the number of even and odd indices, and if these resulting values are equal, then the array can be made equal. This is not always true.
2. **Feasibility of Operations**: The code does not check if the operations can actually make all elements equal.

### Test Input:
To expose this issue, we can create a test case where the sums of even and odd indexed elements can be evenly divided by the number of even and odd indices, but the operations cannot make all elements equal.

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

### Explanation:
- **Input**: `1 2 3 4 5`
- **Even Indices**: `1, 3, 5` (Sum = 9)
- **Odd Indices**: `2, 4` (Sum = 6)
- **Number of Even Indices**: 3
- **Number of Odd Indices**: 2
- **Sum Even / Number of Even Indices**: 9 / 3 = 3
- **Sum Odd / Number of Odd Indices**: 6 / 2 = 3

The sums can be evenly divided, and the resulting values are equal. However, it is impossible to make all elements equal through the allowed operations. For example, the array `1 2 3 4 5` cannot be transformed into an array where all elements are equal because the operations can only transfer values between adjacent elements, and there is no way to balance the values to make them all equal.

This test input should expose the bug in the code.


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Transfusion
time_limit_ms: 2000
memory_limit_mb: 256
Description: You are given an array $$$a$$$ of length $$$n$$$. In one operation, you can pick an index $$$i$$$ from $$$2$$$ to $$$n-1$$$ inclusive, and do one of the following actions:

- Decrease $$$a_{i-1}$$$ by $$$1$$$, then increase $$$a_{i+1}$$$ by $$$1$$$.
- Decrease $$$a_{i+1}$$$ by $$$1$$$, then increase $$$a_{i-1}$$$ by $$$1$$$.

After each operation, all the values must be non-negative. Can you make all the elements equal after any number of operations?

Input: First line of input consists of one integer $$$t$$$ ($$$1 \le t \le 10^4$$$)  — the number of test cases.

First line of each test case consists of one integer $$$n$$$ ($$$3 \le n \le 2\cdot 10^5$$$).

Second line of each test case consists of $$$n$$$ integers $$$a_i$$$ ($$$1 \le a_i \le 10^9$$$).

It is guaranteed that the sum of $$$n$$$ of all test cases doesn't exceed $$$2\cdot 10^5$$$.

Output: For each test case, print "YES" without quotation marks if it is possible to make all the elements equal after any number of operations; otherwise, print "NO" without quotation marks.

You can print answers in any register: "yes", "YeS", "nO"  — will also be considered correct.

Examples:
input:
8
3
3 2 1
3
1 1 3
4
1 2 5 4
4
1 6 6 1
5
6 2 1 4 2
4
1 4 2 1
5
3 1 2 1 3
3
2 4 2
output:
YES
NO
YES
NO
YES
NO
NO
NO

Note:

Buggy Code:
import java.util.*;
public class Solution {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int t = sc.nextInt();

        while (t-- > 0) {
            int n = sc.nextInt();
            long[] a = new long[n];
            long sum = 0;
            for (int i = 0; i < n; i++) {
                a[i] = sc.nextLong();
                sum += a[i];
            }
            boolean f=true;
            if (sum % n == 0) {
                long target = sum / n;
                long d[]=new long[n/2];
                if(n%2==0)
                {
                    for(int i=1;i<n-1;i++)
                    {
                        d[i-1]=a[i-1]+a[i+1]-2*target;
                        if(d[i-1]!=0)
                        {f=false;break;}
                    }
                    if(f)
                    System.out.println("YES");
                    else System.out.println("NO");
                }
                else
                {
                    long x=0;int i=0;
                    for(i=1;i<n-2;i++)
                    {
                        d[i-1]=a[i-1]+a[i+1]-2*target;
                        x+=d[i-1];
                        // if(n==5)
                        // System.out.println("x = "+x);
                    }
                    if(n>3)
                    {
                        if(x<0) System.out.println("NO");
                        else if(x+a[n-1]-target == 0) System.out.println("YES");
                        else System.out.println("NO");
                    }
                    else
                    {
                        x+=a[1]-target;
                        if(x==0) System.out.println("YES");
                        else System.out.println("NO");
                    }
                }

            }
            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
3
5
1 2 3 4 5
4
1 1 1 1
3
2 4 2
```


**Task:**
Generate a challenging test input that exposes the bug in the buggy code of the algorithm problem:
Algorithm Problem:
Title: Transfusion
time_limit_ms: 2000
memory_limit_mb: 256
Description: You are given an array $$$a$$$ of length $$$n$$$. In one operation, you can pick an index $$$i$$$ from $$$2$$$ to $$$n-1$$$ inclusive, and do one of the following actions:

- Decrease $$$a_{i-1}$$$ by $$$1$$$, then increase $$$a_{i+1}$$$ by $$$1$$$.
- Decrease $$$a_{i+1}$$$ by $$$1$$$, then increase $$$a_{i-1}$$$ by $$$1$$$.

After each operation, all the values must be non-negative. Can you make all the elements equal after any number of operations?

Input: First line of input consists of one integer $$$t$$$ ($$$1 \le t \le 10^4$$$)  — the number of test cases.

First line of each test case consists of one integer $$$n$$$ ($$$3 \le n \le 2\cdot 10^5$$$).

Second line of each test case consists of $$$n$$$ integers $$$a_i$$$ ($$$1 \le a_i \le 10^9$$$).

It is guaranteed that the sum of $$$n$$$ of all test cases doesn't exceed $$$2\cdot 10^5$$$.

Output: For each test case, print "YES" without quotation marks if it is possible to make all the elements equal after any number of operations; otherwise, print "NO" without quotation marks.

You can print answers in any register: "yes", "YeS", "nO"  — will also be considered correct.

Examples:
input:
8
3
3 2 1
3
1 1 3
4
1 2 5 4
4
1 6 6 1
5
6 2 1 4 2
4
1 4 2 1
5
3 1 2 1 3
3
2 4 2
output:
YES
NO
YES
NO
YES
NO
NO
NO

Note:

Buggy Code:
import java.lang.*;
import java.io.*;
import java.util.*;
import java.util.logging.LogRecord;
import java.util.logging.Logger;

public class Main {
    static int mod = 1000000007;
    static PrintWriter out;
    static Scanner sc;

    static class TrieNode {
        TrieNode[] childArray = new TrieNode[26];
        ArrayList<int[]> infoList = new ArrayList<>();
    }

    /**
     * Finds the index of the first element in the sorted list that is not less than the target value.
     *
     * @param sortedList A sorted list of integers.
     * @param target     The target value to find the lower bound for.
     * @return The index of the first element that is not less than the target value.
     */
    public static int lowerBound(ArrayList<Integer> sortedList, double target) {
        int lo = 0;
        int hi = sortedList.size();
        while (lo < hi) {
            int mid = (lo + hi) / 2;
            if (sortedList.get(mid) < target) {
                lo = mid + 1;
            } else {
                hi = mid;
            }
        }
        return lo < sortedList.size() ? lo : -1;
    }

    /**
     * Finds the index of the first element in the sorted list that is greater than the target value.
     *
     * @param sortedList A sorted list of integers.
     * @param target     The target value to find the upper bound for.
     * @return The index of the first element that is greater than the target value.
     */
    public static int upperBound(int[] sortedList, int target) {
        int lo = 0;
        int hi = sortedList.length;
        while (lo < hi) {
            int mid = (lo + hi) / 2;
            if (sortedList[mid] <= target) {
                lo = mid + 1;
            } else {
                hi = mid;
            }
        }
        return lo;
    }

    static class TreeNode {
        int value;
        TreeNode left;
        TreeNode right;

        TreeNode(int value) {
            this.value = value;
            right = null;
            left = null;
        }
    }

    private TrieNode buildTrie(String[] words, int[] costs) {
        TrieNode root = new TrieNode();
        for (int i = 0; i < words.length; i++) {
            TrieNode curr = root;
            for (char c : words[i].toCharArray()) {
                int charIndex = c - 'a';
                if (curr.childArray[charIndex] == null) {
                    curr.childArray[charIndex] = new TrieNode();
                }
                curr = curr.childArray[charIndex];
            }
            curr.infoList.add(new int[]{words[i].length(), costs[i]});
        }
        return root;
    }

    static class DSU {
        int[] par, size;

        DSU(int n) {
            par = new int[n + 1];
            size = new int[n + 1];
            Arrays.fill(size, 1);
            for (int i = 0; i <= n; i++)
                par[i] = i;
        }

        int findLeader(int node) {
            if (node == par[node])
                return node;
            return par[node] = findLeader(par[node]); // path comp
        }

        void unionBySize(int u, int v) {
            int uparU = findLeader(u);
            int uparV = findLeader(v);
            if (uparU == uparV)
                return;
            if (size[uparU] < size[uparV]) {
                par[uparU] = uparV;
                size[uparV] += size[uparU];
            } else {
                par[uparV] = uparU;
                size[uparU] += size[uparV];
            }
        }
    }

    public static class FenwickTree {
        long[] fen;
        long size;

        FenwickTree(int n) {
            fen = new long[n];
            size = n;
        }

        void update(long i, long add) {
            for (i++; i < size; i += i & -i) fen[(int) i] += add;
        }

        long sum(long i) {
            long sum = 0;
            for (; i > 0; i -= i & -i) sum += fen[(int) i];
            return sum;
        }
    }

    public static class Pair<L, R> {

        private final L left;
        private final R right;

        public Pair(L left, R right) {
            assert left != null;
            assert right != null;

            this.left = left;
            this.right = right;
        }

        public L getLeft() {
            return left;
        }

        public R getRight() {
            return right;
        }

        @Override
        public int hashCode() {
            return left.hashCode() ^ right.hashCode();
        }

        @Override
        public boolean equals(Object o) {
            if (!(o instanceof Pair)) return false;
            Pair pairo = (Pair) o;
            return this.left.equals(pairo.getLeft()) &&
                    this.right.equals(pairo.getRight());
        }
    }

    public static long mod_sub(long a, long b, long m) {
        a = a % m;
        b = b % m;
        return (((a - b) % m) + m) % m;
    }

    public static long powerMod(long x, long y, long p) {
        long res = 1;
        x = x % p;
        if (x == 0)
            return 0;
        while (y > 0) {
            if ((y & 1) > 0)
                res = (res * x) % p;
            y = y >> 1;
            x = (x * x) % p;
        }
        return res;
    }

    public static long power(long a, long b) {
        long result = 1;
        while (b > 0) {
            if ((b & 1) == 1) {
                result *= a;
            }
            a *= a;
            b >>= 1;
        }
        return result;
    }

    private static boolean isPalindrome(String s) {
        StringBuilder str1 = new StringBuilder(s);
        str1.reverse();

        return s.contentEquals(str1);
    }

    static int sumOfSubArrayProd(int[] arr, int l, int r, int m) {
        int ans = 0;
        int res = 0;
        int sum = 0;
        for (int i = r - 1; i >= l; i--) {
            int incr = ((arr[i] % m) * ((1 + res) % m)) % m;
            ans = (ans % m + incr % m) % m;
            res = (incr % m);
            sum += arr[i];
        }
        return (ans % m - sum % m) % m;
    }

    public static void println(int[] a) {
        for (int i : a) out.print(i + " ");
        out.println();
    }

    public static boolean isPrime(long n) {
        if (n <= 1)
            return false;
        if (n == 2 || n == 3)
            return true;

        if (n % 2 == 0 || n % 3 == 0)
            return false;

        for (int i = 5; i <= Math.sqrt(n); i = i + 6)
            if (n % i == 0 || n % (i + 2) == 0)
                return false;

        return true;
    }

    static long getLargestDivisor(long number) {
        long i;
        for (i = 2; i <= Math.sqrt(number); i++) {
            if (number % i == 0) {
                return number / i;
            }
        }
        return 1L;
    }

    static int gcd(int a, int b) {
        if (b == 0)
            return a;
        return gcd(b, a % b);
    }

    public static int lengthOfLIS(ArrayList<Integer> nums) {
        if (nums == null || nums.isEmpty()) {
            return 0;
        }

        int n = nums.size();
        int[] dp = new int[n];
        Arrays.fill(dp, 1);

        for (int i = 1; i < n; ++i) {
            for (int j = 0; j < i; ++j) {
                if (nums.get(i) > nums.get(j)) {
                    dp[i] = Math.max(dp[i], dp[j] + 1);
                }
            }
        }

        int maxLength = Arrays.stream(dp).max().orElse(0);
        return maxLength;
    }

    static ArrayList<ArrayList<Integer>> allPaths = new ArrayList<>();

    public static void getAllPaths(int s, int d, int n, ArrayList<ArrayList<Integer>> graph) {
        boolean[] isVisited = new boolean[n];
        ArrayList<Integer> pathList = new ArrayList<>();
        pathList.add(s);
        getAll(s, d, isVisited, pathList, graph);
    }

    private static void getAll(Integer u, Integer d, boolean[] isVisited, ArrayList<Integer> localPathList, ArrayList<ArrayList<Integer>> graph) {

        if (u.equals(d)) {
            allPaths.add(new ArrayList<>(localPathList));
            return;
        }

        isVisited[u] = true;

        for (Integer i : graph.get(u)) {
            if (!isVisited[i]) {
                localPathList.add(i);
                getAll(i, d, isVisited, localPathList, graph);
                localPathList.remove(i);
            }
        }

        isVisited[u] = false;
    }

    private int dijkstra(int n, ArrayList<ArrayList<ArrayList<Integer>>> graph) {
        int[] dist = new int[n];
        Arrays.fill(dist, Integer.MAX_VALUE);
        dist[0] = 0;
        PriorityQueue<int[]> pq = new PriorityQueue<>(Comparator.comparingInt(a -> a[0]));
        pq.offer(new int[]{0, 0});

        while (!pq.isEmpty()) {
            int[] ele = pq.poll();
            int cd = ele[0], node = ele[1];
            if (node == n - 1) return dist[n - 1];
            if (cd > dist[node]) continue;
            for (ArrayList<Integer> neighbor : graph.get(node)) {
                int nbr = neighbor.get(0), wt = neighbor.get(1);
                if (cd + wt < dist[nbr]) {
                    dist[nbr] = cd + wt;
                    pq.offer(new int[]{cd + wt, nbr});
                }
            }
        }
        return dist[n - 1];
    }

    static ArrayList<Integer> getAllDivisors(int n) {
        ArrayList<Integer> arr = new ArrayList<>();
        for (int i = 1; i <= Math.sqrt(n); i++) {
            if (n % i == 0) {
                if (n / i == i) {
                    arr.add(i);
                } else {
                    arr.add(i);
                    arr.add(n / i);
                }
            }
        }
        return arr;
    }

    public static void yes() {
        out.println("Yes");
    }

    public static void no() {
        out.println("No");
    }

    public static class Triple {
        private Long first;
        private Long second;
        private Long third;

        public Triple(Long first, Long second, Long third) {
            this.first = first;
            this.second = second;
            this.third = third;
        }

        public Long getFirst() {
            return first;
        }

        public void setFirst(Long first) {
            this.first = first;
        }

        public Long getSecond() {
            return second;
        }

        public void setSecond(Long second) {
            this.second = second;
        }

        public Long getThird() {
            return third;
        }

        public void setThird(Long third) {
            this.third = third;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;

            Triple triple = (Triple) o;

            if (!Objects.equals(first, triple.first)) return false;
            if (!Objects.equals(second, triple.second)) return false;
            return Objects.equals(third, triple.third);
        }

        @Override
        public int hashCode() {
            int result = first != null ? first.hashCode() : 0;
            result = 31 * result + (second != null ? second.hashCode() : 0);
            result = 31 * result + (third != null ? third.hashCode() : 0);
            return result;
        }
    }

    public static void dfs(ArrayList<ArrayList<Integer>> graph, int node, int par, int dep) {
        for (int nei : graph.get(node)) {
            if (nei != par) {
                dfs(graph, nei, node, dep + 1);
            }
        }
    }

    static int greatestDivisor(int number) {
        int i;
        for (i = 2; i <= Math.sqrt(number); i++) {
            if (number % i == 0) {
                return number / i;
            }
        }
        return 1;
    }

    static boolean isPowerOfTwo(int n) {
        if (n == 0)
            return false;

        return (int) (Math.ceil((Math.log(n) / Math.log(2))))
                == (int) (Math.floor(
                ((Math.log(n) / Math.log(2)))));
    }

    static <K, V extends Comparable<? super V>>
    SortedSet<Map.Entry<K, V>> entriesSortedByValues(Map<K, V> map) {
        SortedSet<Map.Entry<K, V>> sortedEntries = new TreeSet<Map.Entry<K, V>>(
                new Comparator<Map.Entry<K, V>>() {
                    @Override
                    public int compare(Map.Entry<K, V> e1, Map.Entry<K, V> e2) {
                        int res = e1.getValue().compareTo(e2.getValue());
                        return res != 0 ? res : 1;
                    }
                }
        );
        sortedEntries.addAll(map.entrySet());
        return sortedEntries;
    }

    static int getInvCount(int[] arr) {
        int n = arr.length;
        int inv_count = 0;

        for (int i = 0; i < n - 1; i++) {
            for (int j = i + 1; j < n; j++) {
                // If the current element is greater than the next,
                // increment the count
                if (arr[i] > arr[j])
                    inv_count++;
            }
        }
        return inv_count;
    }

    public static int countInversions(char[] arr) {
        int count = 0, res = 0;
        for (int i = arr.length - 1; i >= 0; i--) {
            if (arr[i] == '1') {
                res += count;
            } else {
                count++;
            }
        }
        return res;
    }

    static long getKthBit(long n, long k) {
        return (n & (1L << (k))) >> (k);
    }

    static boolean graphColoringUtil(boolean[][] graph, int m, int[] color, int v, int n) {
        if (v == n)
            return true;

        for (int c = 1; c <= m; c++) {
            if (isSafe(v, graph, color, c, n)) {
                color[v] = c;
                if (graphColoringUtil(graph, m, color, v + 1, n))
                    return true;
                color[v] = 0;
            }
        }

        return false;
    }

    static boolean isSafe(int v, boolean[][] graph, int[] color, int c, int n) {
        for (int i = 0; i < n; i++)
            if (graph[v][i] && c == color[i])
                return false;
        return true;
    }

    static long moduloMultiplication(long a, long b, long mod) {
        long res = 0;
        a %= mod;

        while (b > 0) {

            if ((b & 1) != 0)
                res = (res + a) % mod;

            a = (2 * a) % mod;
            b >>= 1;
        }
        return res;
    }

    static boolean isPerfectSquare(long number) {
        double sqrt = Math.sqrt(number);
        return ((sqrt - Math.floor(sqrt)) == 0);
    }

    static long x, y;

    static long gcdExtended(long a, long b) {

        if (a == 0) {
            x = 0;
            y = 1;
            return b;
        }

        long gcd = gcdExtended(b % a, a);
        long x1 = x;
        long y1 = y;
        x = y1 - (b / a) * x1;
        y = x1;

        return gcd;
    }

    static long modInverse(long a, long m) {
        long g = gcdExtended(a, m);
        if (g != 1)
            return -1;
        return (x % m + m) % m;
    }

    static long modDivide(long a, long b, long m) {

        a = a % m;
        long inv = modInverse(b, m);
        if (inv == -1)
            return 0;
        else
            return (inv * a) % m;
    }

    static long nCr(long n, long r, long p) {
        if (r > n)
            return 0;
        if (r > n - r)
            r = n - r;
        long x = 1;
        for (long i = 1L; i <= r; i++) {
            x = moduloMultiplication(x, (n + 1L - i), p);
            x = modDivide(x, i, p);
        }
        return x;
    }

    private static int[] reverseArr(int[] a) {
        int[] rev = new int[a.length];
        for (int i = 0; i < a.length; i++) {
            rev[i] = a[a.length - i - 1];
        }
        return rev;
    }

    private static void printArr(int[] p) {
        for (int i : p) {
            System.out.print(i + " ");
        }
        System.out.println();
    }

    public static boolean overlap(int x1, int y1, int x2, int y2) {
        return x1 <= y2 && y1 >= x2;
    }

    static int lds(int arr[], int n) {
        int[] lds = new int[n];
        int i, j, max = 0;
        for (i = 0; i < n; i++)
            lds[i] = 1;
        for (i = 1; i < n; i++) {
            for (j = 0; j < i; j++) {
                if (arr[i] < arr[j] && lds[i] < lds[j] + 1) {
                    lds[i] = lds[j] + 1;
                }
            }
        }
        for (i = 0; i < n; i++)
            if (max < lds[i])
                max = lds[i];
        return max;
    }

    static int lis(int arr[], int n) {
        int[] lis = new int[n];
        Arrays.fill(lis, 1);
        for (int i = 1; i < n; i++)
            for (int prev = 0; prev < i; prev++)
                if (arr[i] > arr[prev] && lis[i] < lis[prev] + 1)
                    lis[i] = lis[prev] + 1;
        int max = 1;
        for (int i = 0; i < n; i++)
            max = Math.max(max, lis[i]);

        return max;
    }

    public static int[] findMex(ArrayList<Integer> arr) {
        int[] kk = new int[2];
        Arrays.fill(kk, -1);
        int mex = 0, f = 0;
        for (int j = 0; j < arr.size(); j++) {
            if (arr.get(j) == mex) {
                mex++;
            } else {
                if (f == 1) {
                    kk[1] = mex;
                    break;
                }
                f = 1;
                kk[0] = mex;
                mex++;
                j--;
            }
        }
        if (kk[0] == -1) {
            kk[0] = arr.size();
            kk[1] = arr.size() + 1;
        } else if (kk[1] == -1) {
            kk[1] = mex;
        }
        return kk;
    }

    private static int findMax(int[] count) {
        int max = Integer.MIN_VALUE;
        for (int i : count) {
            max = Math.max(max, i);
        }
        return max;
    }

    public static boolean next_permutation(int[] p) {
        for (int a = p.length - 2; a >= 0; --a)
            if (p[a] < p[a + 1])
                for (int b = p.length - 1; ; --b)
                    if (p[b] > p[a]) {
                        int t = p[a];
                        p[a] = p[b];
                        p[b] = t;
                        for (++a, b = p.length - 1; a < b; ++a, --b) {
                            t = p[a];
                            p[a] = p[b];
                            p[b] = t;
                        }
                        return true;
                    }
        return false;
    }

    static long largestPower(long n, long p) {
        long x = 0;

        while (n > 0) {
            n /= p;
            x += n;
        }
        return x;
    }

    static long modFact(int n, int p) {
        if (n >= p) {
            return 0;
        }

        long res = 1;

        boolean isPrime[] = new boolean[n + 1];
        Arrays.fill(isPrime, true);
        for (int i = 2; i * i <= n; i++) {
            if (isPrime[i]) {
                for (int j = 2 * i; j <= n; j += i) {
                    isPrime[j] = false;
                }
            }
        }

        for (int i = 2; i <= n; i++) {
            if (isPrime[i]) {
                long k = largestPower(n, i);

                res = (res * powerMod(i, k, p)) % p;
            }
        }
        return res;
    }

    public static int[][] merge(ArrayList<int[]> intervals) {
        Collections.sort(intervals, (a, b) -> Integer.compare(a[0], b[0]));
        LinkedList<int[]> merged = new LinkedList<>();
        for (int[] interval : intervals) {
            if (merged.isEmpty() || merged.getLast()[1] < interval[0]) {
                merged.add(interval);
            } else {
                merged.getLast()[1] = Math.max(merged.getLast()[1], interval[1]);
            }
        }
        return merged.toArray(new int[merged.size()][]);
    }

    static class Reader {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader() {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException {
            din = new DataInputStream(
                    new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1) {
                if (c == '\n') {
                    if (cnt != 0) {
                        break;
                    } else {
                        continue;
                    }
                }
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException {
            int ret = 0;
            byte c = read();
            while (c <= ' ') {
                c = read();
            }
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (c == '.') {
                while ((c = read()) >= '0' && c <= '9') {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException {
            bytesRead = din.read(buffer, bufferPointer = 0,
                    BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException {
            if (din == null)
                return;
            din.close();
        }
    }

    public static HashMap<Integer, Integer> sortByValue(HashMap<Integer, Integer> hm) {
        List<Map.Entry<Integer, Integer>> list =
                new LinkedList<>(hm.entrySet());

        list.sort(Map.Entry.comparingByValue());

        HashMap<Integer, Integer> temp = new LinkedHashMap<>();
        for (Map.Entry<Integer, Integer> aa : list) {
            temp.put(aa.getKey(), aa.getValue());
        }
        return temp;
    }

    static int MAX = 100, n;

    static int[] store = new int[MAX];

    static int[][] graph = new int[MAX][MAX];

    static int[] d = new int[MAX];

    static boolean is_clique(int b) {

        for (int i = 1; i < b; i++) {
            for (int j = i + 1; j < b; j++)

                // If any edge is missing
                if (graph[store[i]][store[j]] == 0)
                    return false;
        }
        return true;
    }

    static int maxCliques(int i, int l) {
        int max_ = 0;

        for (int j = i + 1; j <= n; j++) {

            store[l] = j;
            if (is_clique(l + 1)) {

                max_ = Math.max(max_, l);
                max_ = Math.max(max_, maxCliques(j, l + 1));
            }
        }
        return max_;
    }

    public static int distinctSubstring(String str) {

        // Put all distinct substring in a HashSet
        Set<String> result = new HashSet<String>();

        // List All Substrings
        for (int i = 0; i <= str.length(); i++) {
            for (int j = i + 1; j <= str.length(); j++) {

                // Add each substring in Set
                result.add(str.substring(i, j));
            }
        }

        // Return the HashSet
        return result.size();
    }

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

    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        out = new PrintWriter(System.out);
        long tes = sc.nextInt();
        while (tes-- != 0) {
            int n = sc.nextInt();
            int[] arr = new int[n];
            int sum = 0;
            for (int i = 0; i < n; i++) {
                arr[i] = sc.nextInt();
                sum += arr[i];
            }
            for (int i = 1; i < n - 1; i++) {
                if ((arr[i - 1] + arr[i + 1]) % 2 != 0) {
                    int avg = (arr[i - 1] + arr[i + 1]) / 2;
                    arr[i - 1] = avg;
                    arr[i + 1] = avg + 1;
                } else {
                    int avg = (arr[i - 1] + arr[i + 1]) / 2;
                    arr[i - 1] = arr[i + 1] = avg;
                }
            }
//            printArr(arr);
            int val = arr[0];
            int f = 0;
            for(int i: arr) {
                if(i  != val) {
                    f = 1;
                    break;
                }
            }
            if(f == 1) no(); else yes();
//            int size = 0, ans = 0;
//            for (int i = 0; i < n; i++) {
//                if (size + arr[i].length() <= x) {
//                    size += arr[i].length();
//                    ans++;
//                } else {
//                    break;
//                }
//            }
//            out.println(ans);
//            int n = 130, count = 0;
//            grid = new char[n][n];
//            char[][] init = new char[n][n];
//            int posi = -1, posj = -1;
//            for (int i = 0; i < n; i++) {
//                String s = sc.nextLine();
//                for (int j = 0; j < n; j++) {
//                    grid[i][j] = s.charAt(j);
//                    init[i][j] = grid[i][j];
//                    if (grid[i][j] == '^') {
//                        posi = i;
//                        posj = j;
//                    }
//                }
//            }
//
//
//            for (int i = 0; i < n; i++) {
//                for (int j = 0; j < n; j++) {
//                    if (i == posi && j == posj) continue;
//
//                    if (grid[i][j] != '#') {
//                        grid[i][j] = '#';
//                        dp(posi, posj, 0,i,j);
//
//                        for (int k = 0; k < n; k++) {
//                            System.arraycopy(init[k], 0, grid[k], 0, n);
//                        }
//                    }
//                }
//            }
//
//            out.println(ans);

        }
        sc.close();
        out.close();
    }

    static char[][] grid;

    static int ans = 0;

    private static void dp(int i, int j, int t, int i1, int j1) {
        try {
            if (i >= grid.length || j >= grid[0].length || i < 0 || j < 0) {
                return;
            }

            if (t == 0) {
                if (i - 1 >= 0 && grid[i - 1][j] == '#') {
                    dp(i, j + 1, 1, i, j);
                } else {
                    dp(i - 1, j, 0, i, j);
                }
            } else if (t == 1) {
                if (j + 1 < grid[0].length && grid[i][j + 1] == '#') {
                    dp(i + 1, j, 2, i, j);
                } else {
                    dp(i, j + 1, 1, i, j);
                }
            } else if (t == 2) {
                if (i + 1 < grid.length && grid[i + 1][j] == '#') {
                    dp(i, j - 1, 3, i, j);
                } else {
                    dp(i + 1, j, 2, i, j);
                }
            } else if (t == 3) {
                if (j - 1 >= 0 && grid[i][j - 1] == '#') {
                    dp(i - 1, j, 0, i, j);
                } else {
                    dp(i, j - 1, 3, i, j);
                }
            }
        } catch (StackOverflowError | Exception e) {
            ans++;
        }
    }

}

**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. The buggy code attempts to make all elements in the array equal by performing a series of operations. The key issue in the code is the incorrect handling of the operations and the final check to see if all elements are equal.

### Step-by-Step Analysis:
1. **Edge Case: All Elements Already Equal**
   - If all elements are already equal, the code should return "YES" without performing any operations. This is a straightforward case but important to check.

2. **Edge Case: Elements That Cannot Be Equalized**
   - If the sum of the array is not divisible by the number of elements, it is impossible to make all elements equal. This is a key condition to check.

3. **Edge Case: Odd and Even Distributions**
   - Test cases where the elements have a mix of odd and even values, which can make it difficult to balance the array.

4. **Edge Case: Large Differences Between Elements**
   - Test cases with large differences between the elements to see if the code can handle such scenarios efficiently.

### Challenging Test Input:
Given the constraints and the need for a small-scale test input, let's create a test case that covers the above scenarios.

```plaintext
3
3
1 2 3
4
4 5 6 7
5
1 1 1 1 1
```

### Explanation:
1. **Test Case 1: [1, 2, 3]**
   - Sum = 1 + 2 + 3 = 6
   - 6 is divisible by 3, so it is possible to make all elements equal. The correct output should be "YES".

2. **Test Case 2: [4, 5, 6, 7]**
   - Sum = 4 + 5 + 6 + 7 = 22
   - 22 is not divisible by 4, so it is impossible to make all elements equal. The correct output should be "NO".

3. **Test Case 3: [1, 1, 1, 1, 1]**
   - All elements are already equal. The correct output should be "YES".

This test input is designed to cover a range of scenarios, including cases where the elements are already equal, cases where the sum is not divisible by the number of elements, and a simple case with a mix of small values. This should help expose any bugs in the provided code.