#include #include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int T; cin >> T; while (T--) { int A, B; cin >> A >> B; cout << A * B + B << endl; } return 0; }