#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:33554432")
using namespace std;
pair<long long, long long> ans;
long long s3(long long x) { return x * x * x; }
void f(long long m, long long step, long long r) {
  if (m == 0) {
    ans = max(ans, make_pair(step, r));
    return;
  }
  long long x = 1;
  while (s3(x + 1) <= m) ++x;
  f(m - s3(x), step + 1, r + s3(x));
  if (x - 1 >= 0) f(s3(x) - 1 - s3(x - 1), step + 1, r + s3(x - 1));
}
int main() {
  long long m;
  cin >> m;
  f(m, 0, 0);
  cout << ans.first << " " << ans.second << endl;
  return 0;
}
