#include<stdio.h>
#include<stdlib.h>
main()
{
unsigned long long a,i,f,g;
while(scanf("%d",&a)!=EOF)
for(i=1,f=0,g=0;i<=a;i++)
f+=i;
g+=f;
}
printf("%d %d\n",f,g);