#include using namespace std; typedef long long int ll; typedef pair P; typedef vector VI; typedef vector VVI; #define REP(i,n) for(ll i=0;i<(n);i++) #define ALL(v) v.begin(),v.end() constexpr ll MOD=1000000007; constexpr ll INF=1e18; ll power(ll x, ll y, ll m){ x%=m; ll ret=1; while(y){ if(y&1) ret=ret*x%m; x=x*x%m; y>>=1; } return ret; } int main(){ int t; cin >> t; while(t--){ int v, x; cin >> v >> x; int p=v*x+1; for(int i=1;i