#include #include int main() { int t; int n,m,p,q; int i,k,te,lll,cnt; int flag; int min; scanf("%d",&t); while(t--) { cnt=k=te=i=flag=lll=0; min=999999999; scanf("%d %d %d %d",&n,&m,&p,&q); te=n*p; if(te