# Used Python for handling large integers

for _ in range(int(input())):
	a,b = list(map(int,input().split()))
	print(a*b) 

# Used Python for handling large integers

for _ in range(int(input())):
	a,b = list(map(int,input().split()))
	print(a*b) 

# Used Python for handling large integers