#pragma GCC optimize("Ofast") #include #define int long long #define elif else if using namespace std; void fileio(const string &s) { freopen((s+".in").c_str(),"r",stdin); freopen((s+".out").c_str(),"w",stdout); } const int INF=4e18; inline int read() { int x=0; bool flag=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') flag=0; c=getchar(); } while(c>='0'&&c<='9') { x=(x<<1)+(x<<3)+c-'0'; c=getchar(); } return (flag?x:~(x-1)); } int t,n,a,b,c; void solve() { n=read(); a=read(); b=read(); c=read(); if(n==1) { if(a==b&&b==c) puts("yes"); else puts("no"); return ; } if(n==2) { if(as1||n*ca) { puts("no"); return ; } if(c