#include <bits/stdc++.h>
using namespace std;
string FileName = "input";
long long n;
long long f(long long a) {
  long long p = pow(a, 1.0 / 3);
  return p;
}
long long ans1 = 1, ans2 = 1;
pair<int, int> ans[1000001];
pair<int, long long> res(long long m) {
  if (m == 0) return {0, 0};
  if (m <= 1e6 && ans[m] != make_pair(0, 0)) {
    return ans[m];
  }
  int p = f(m);
  pair<int, long long> Pr = {0, 0};
  for (int i = p + 1 - 1; i >= max(p - 9, 1); --i) {
    long long j = i;
    long long S = (j + 1) * (j + 1) * (j + 1) - 1;
    long long L = j * j * j;
    for (int k = 1; k < min(S / L, m / L) + 1; ++k) {
      auto ans = res(min(S, m) - L * k);
      ++ans.first;
      ans.second += L * k;
      Pr = max(Pr, ans);
    }
  }
  if (m <= 1e6) ans[m] = Pr;
  return Pr;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  auto ans = res(n);
  cout << ans.first << ' ' << ans.second << endl;
}
