T = int(input()) for i in range(T): A, B = map(int, input().split()) stress = A * B print(B + stress)