#include #define N using namespace std; int t,n,m,x,y; int main() { scanf("%d",&t); for(int T=0; T