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

c=(a*b)-(b+a-1)

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

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

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

-c = (a * b) - (b + a - 1) -print(c) +print((a * b - a - b + 1))