#include using namespace std; using ll =long long; #define all(v) v.begin(),v.end() #define rep(i,a,b) for(int i=a;i=b;i--) ll INF=2e18; void solve() { ll L,R,A,B;cin>>L>>R>>A>>B; ll ans=-INF; ans=max(ans,A*R+B); ans=max(ans,A*L+B); cout<>t; for(ll i=0;i