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