#include<iostream>
using namespace std;
int main() {
long long int Number; //記得設long long ,這很重要
while (cin >> Number) {
long long int g_sum = 1, f_sum = 1;
for (long long int i = 2; i <= Number; i++) {
f_sum += i; //不用遞歸,經過數學計算,可發現f(n) = (1 + 2 +......+n)
g_sum += f_sum; //不用遞歸,經過數學計算,可發現g(n) = f(1)+f(2)+......+f(n)
}
cout << f_sum << " " << g_sum << endl;;
}
return 0;
}