#include using namespace std; int main(){ int T; cin >> T; for(int i=0;i> A >> B; cout << (A+1)*B << endl; } }