def f(n):
if n==1:
return 1
return n*(n+1)//2
def g(n):
if n==1:
return 1
return n*(n+1)*(2*n+1)/12+n*(n+1)/4
while True:
try:
n=int(input())
except:
break
print(f(n),int(g(n)))
def f(n):
if n==1:
return 1
return n*(n+1)//2
def g(n):
if n==1:
return 1
return n*(n+1)*(2*n+1)/12+n*(n+1)/4
while True:
try:
n=int(input())
except:
break
print(f(n),int(g(n)))
f(n)=n*(n+1)/2
g(n)=1+f(2)+f(3)+...+f(n)=Σ(k=1 to n) [(n^2+n)/2]=1/2[n(n+1)(2n+1)/6+n(n+1)/2]
g(n)=int(n*(n+1)*(2*n+1)/12+n*(n+1)/4)