#include #include using namespace std; int n,m,p,q; int main() { int t; scanf("%d",&t); while (t--) { scanf("%d%d%d%d",&n,&m,&p,&q); if (p*m