a,b=list(map(int,input().split()))

print((a*b-a-b+1))
A,B=list(map(int,input().split()))

print((A*B-A-B+1))
a, b = list(map(int, input().split()))
print((a * b - a - b + 1))

A, B = list(map(int, input().split()))
print((A * B - A - B + 1))

-a, b = list(map(int, input().split())) -print((a * b - a - b + 1)) +A, B = list(map(int, input().split())) +print((A * B - A - B + 1))