#include using namespace std; using Int=long long; using Real=long double; templateinline bool chmin(T&A,S B){if(A>B){A=B;return true;}else{return false;}} templateinline bool chmax(T&A,S B){if(A>N; REP(i,N)cin>>X[i]; sort(X,X+N); bool ans=X[0]!=X[1]; REP(i,N-1)ans&=X[i+1]-X[i]==X[1]-X[0]; cout<<(ans?"YES":"NO")<<"\n"; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); cout<>TE; while(TE--)sol(); }