using System; class Program { static void Main() { int N = int.Parse(Console.ReadLine()); var life = new int[N, 2]; for(int i = 0; i < N; i++) { var line = Console.ReadLine().Split(' '); for(int j = 0; j < 2; j++) { life[i, j] = int.Parse(line[j]); } int x = life[i, 1]; int down = life[i, 0] * life[i, 1]; Console.WriteLine(x + down); } } }