document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.  
  7. long long int n;
  8. while(cin>>n)
  9. {
  10. cout << n*(n+1)/2 << ' ' << n*(n+1)*(n+2)/6 << endl;
  11. }
  12.  
  13. }
');