#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<long long> f(30001, 0);
vector<long long> g(30001, 0);
f[1] = 1;
g[1] = 1;
for (int i = 2; i <= 30000; ++i) {
f[i] = i + f[i - 1];
g[i] = f[i] + g[i - 1];
}
int n;
while (cin >> n) {
cout << f[n] << " " << g[n] << endl;
}
return 0;
}