# Code

n = int(input())

x = 0

if n > 0:

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

x += i

else:

for i in range(2*n, n+1): # for negative n, we need to reverse start & end of range

x += i

print(x)

n = int(input())

x = 0

if n > 0:

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

x += i

else:

for i in range(2*n, n+1): # for negative n, we need to reverse start & end of range

x += i

print(x)