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

x = a-1

y = b-1

print((x*y))
a,b=list(map(int,input().split()))

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

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

-x = a - 1 -y = b - 1 -print((x * y)) +print(((a - 1) * (b - 1)))