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

print(((a[0]-1)*(a[1]-1)))
a,b=list(map(int,input().split()))

print((a*b-a-b+1))
a = list(map(int, input().split()))
print(((a[0] - 1) * (a[1] - 1)))

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

-a = list(map(int, input().split())) -print(((a[0] - 1) * (a[1] - 1))) +a, b = list(map(int, input().split())) +print((a * b - a - b + 1))