#include<stdio.h>
#include<stdlib.h>
#include<iostream>
using namespace std;
int main(){
int n=0;
while(cin>>n){
cout<<n*(n+1)/2<<" "<<n*(n+1)*(n+2)/6<<endl;
}
return 0;