#include using namespace std; using ll=long long; using ull=unsigned long long; const ll MOD=1000000000+7; #define rep(I,N) for(int I=0;I; using vvec = vector>; ll lcm(ll a,ll b){ return a/__gcd(a,b)*b; } int main(){ int t; cin >> t; vec ans; rep(i,t){ int a,b; cin >> a >> b; ans.push_back(a*b+b); } for(auto i:ans){ printf("%d\n",i); } }