//Codeforcesで128bit整数を使いたいとき
//→__int128_tを使う&GNU C++17 (64)で提出する

//インクルードなど
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower

using namespace std;
typedef long long ll;

//イテレーション
#define REP(i,n) for(ll i=0;i<ll(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=ll(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=ll(b);i--)
#define FORA(i,I) for(const auto& i:I)
//x:コンテナ
#define ALL(x) x.begin(),x.end() 
#define SIZE(x) ll(x.size()) 
//定数
#define INF32 2147483647 //2.147483647×10^{9}:32bit整数のinf
#define INF64 9223372036854775807 //9.223372036854775807×10^{18}:64bit整数のinf
#define MOD 1000000007 //問題による
//略記
#define F first
#define S second
//出力(空白区切りで昇順に)
#define coutALL(x) for(auto i=x.begin();i!=--x.end();i++)cout<<*i<<" ";cout<<*--x.end()<<endl;

//aをbで割る時の繰上げ,繰り下げ
ll myceil(ll a,ll b){return (a+(b-1))/b;}
ll myfloor(ll a,ll b){return a/b;}

signed int main(){
  double a,b,c,d;
  cin>>a>>b>>c;
  d=(a+b+c)/double(3.0);
  cout<<(((a==d)||(b==d)||(c==d))?"Yes":"No");


    

}
#pragma GCC optimize(2)
//#include <bits/stdc++.h>
#include <iostream>
#include <set>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <queue>
#include <vector>
#include <utility>
#include <map>
#define rush()      int T; while(cin>>T) while(T--)
#define ms(a,b)     memset(a,b,sizeof a)
#define lowbit(x)   ((x)&(-x))
#define inf         0x7f7f7f7fll
#define eps         1e-11
#define sd(a)       scanf("%d",&a)
#define sll(a)      scanf("%lld",&a)
#define sll2(a,b)   scanf("%lld%lld",&a,&b)
#define sll3(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define sdd(a,b)    scanf("%d%d",&a,&b)
#define sddd(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define sf(a)       scanf("%lf",&a)
//#define sc(a)       scanf("%c\n",&a)
#define ss(a)       scanf("%s",a)
#define pd(a)       printf("%d\n",a)
#define pdd(a,b)    printf("%d %d\n",a,b)
#define pddd(a,b,c) printf("%d %d %d\n",a,b,c)
#define pll(a)      printf("%lld\n",a)
#define pf(a)       printf("%.1lf\n",a)
#define pc(a)       printf("%c",a)
#define ps(a)       printf("%s\n",a)
#define rep(i,a,b)  for(int i=(a);i<=(b);i++)
#define forn(i,a,b,x)  for(int i=(a);i<=(b);i+=(x))
#define per(i,a,b)  for(int i=(b);i>=(a);i--)
#define pb(a)       push_back(a)
#define mp(a,b)     make_pair(a,b)
#define debug(a)    cout<<#a<<" : "<<a<<" "<<" ; "
#define dbg(a)      cout<<#a<<" : "<<a<<endl
#define show(a,b)   cout<<a<<" :\t"<<b<<"\t*"<<endl
#define IOS         ios::sync_with_stdio(0); cin.tie(0)
#define PAUSE       system("pause")
#define all(x)      x.begin(),x.end()
//#define print(a)    cout<<a<<endl;continue;
#define fr          first
#define sc          second
#define ceils(a,b)  ((a-1ll+b)/(b))
#define floors(a,b) floor(double(a)/double(b))
using namespace std;
//inline void swap(int &x,int &y){x^=y^=x^=y;}
typedef long long ll;
//using ui=unsigned int;
typedef unsigned long long ull;
typedef pair<int,int> pii;
const double pi=acos(-1.0);
const int dx[]={0,1,0,-1};
const int dy[]={1,0,-1,0};
const int limit=5e5;

int read()
{
	int s=0;
	char c=getchar(),lc='+';
	while (c<'0'||'9'<c) lc=c,c=getchar();
	while ('0'<=c&&c<='9') s=s*10+c-'0',c=getchar();
	return lc=='-'?-s:s;
}

void write(int x)
{
	if (x<0) putchar('-'),x=-x;
	if (x<10) putchar(x+'0');
	else write(x/10),putchar(x%10+'0');
}

void print(int x,char c='\n')
{
	write(x);
	putchar(c);
}

ll mod=2147483648;
const int N=3e5+5;
 
    int n, m, _;
    int i, j, k;
    int a[N];
    int pos[N];
    vector<int> ans;

signed main()
{
    //IOS;
    rush(){
        sd(n);
        rep(i, 1, n) sd(a[i]), pos[a[i]] = i;
        int opt = 1;
        rep(i, 1, n){
            if(i == pos[i]) continue;
            if((pos[i] - 1) % 2 != opt){
                if(pos[i] - 2 >= i){
                    ans.pb(pos[i] - 2);
                    int x = pos[i] - 2, y = pos[i] - 1;
                    swap(pos[a[x]], pos[a[y]]);
                    swap(a[x], a[y]);
                    opt ^= 1;
                }
                else if(pos[i] == i + 1){
                    ans.pb(i - 1);
                    ans.pb(i);
                    ans.pb(i - 1);
                    ans.pb(i);
                    ans.pb(i - 1);
                    //ans.pb(i);
                    opt ^= 1;
                    int x = pos[i], y = pos[i] - 1;
                    swap(pos[a[x]], pos[a[y]]);
                    swap(a[x], a[y]);
                    continue;
                }
            }
            for(int j = pos[i] - 1; j >= i; j--){
                ans.pb(j);
                int x = j, y = j + 1;
                swap(pos[a[x]], pos[a[y]]);
                swap(a[x], a[y]);
                opt ^= 1;
            }
        }
        pd(ans.size());
        for(auto it : ans) printf("%d ", it);
        puts("");
        ans.clear();
    }
    //PAUSE;
    return 0;
}
