f=lambda n,p:n-p*n-p*-~p/2
for n, p in input():
	print (n,p),f(n,p)