#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> ans;
void rec(long long m, long long cnt, long long cur) {
  if (m == 0) {
    ans = max(ans, make_pair(cnt, cur));
  } else {
    long long l = 0, r = 100000 + 7, v;
    while (l < r - 1) {
      v = (l + r) >> 1;
      if (v * v * v <= m) {
        l = v;
      } else {
        r = v;
      }
    }
    v = l;
    rec(m - v * v * v, cnt + 1, cur + v * v * v);
    if (v - 1) {
      rec((v * v * v) - 1 - (v - 1) * (v - 1) * (v - 1), cnt + 1,
          cur + (v - 1) * (v - 1) * (v - 1));
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  long long m;
  cin >> m;
  rec(m, 0, 0);
  cout << ans.first << " " << ans.second << '\n';
}
