# 制約チェック T = int(input()) assert 1 <= T and T <= 100000 for _ in range(T): line = list(map(int, input().split())) assert len(line) == 2 H, W = line assert 1 <= H and H <= 1_000_000_000 assert 1 <= W and W <= 1_000_000_000