n, m = list(map(int, input().split()))



a = []

for i in range(1,n+1):

  a.append(2*i)

for j in range(1, m+1):

  a.append(2*j - 1)



counter = 0

for i in range(len(a)-1):

  for j in range(i+1, len(a)):

    if (a[i] + a[j]) % 2 == 0:

      counter += 1

      

print(counter)
n, m = list(map(int, input().split()))



ans = n * (n-1) // 2 + m * (m-1) // 2

print(ans)
n, m = list(map(int, input().split()))
a = []
for i in range(1, n + 1):
    a.append(2 * i)
for j in range(1, m + 1):
    a.append(2 * j - 1)
counter = 0
for i in range(len(a) - 1):
    for j in range(i + 1, len(a)):
        if (a[i] + a[j]) % 2 == 0:
            counter += 1
print(counter)

n, m = list(map(int, input().split()))
ans = n * (n - 1) // 2 + m * (m - 1) // 2
print(ans)

-a = [] -for i in range(1, n + 1): -    a.append(2 * i) -for j in range(1, m + 1): -    a.append(2 * j - 1) -counter = 0 -for i in range(len(a) - 1): -    for j in range(i + 1, len(a)): -        if (a[i] + a[j]) % 2 == 0: -            counter += 1 -print(counter) +ans = n * (n - 1) // 2 + m * (m - 1) // 2 +print(ans)