#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> ans;
long long N;
long long cube(long long X) { return X * X * X; }
void recurse(long long pos, long long used, long long was) {
  if (pos == 0) {
    ans = max(ans, make_pair(used, was));
    return;
  }
  long long cub = cbrt(pos);
  recurse(pos - cube(cub), used + 1, was + cube(cub));
  if (cub > 1) {
    recurse(cube(cub) - 1 - cube(cub - 1), used + 1, was + cube(cub - 1));
  }
}
int main() {
  if (fopen("cf680d.in", "r")) {
    freopen("cf680d.in", "r", stdin);
    freopen("cf680d.out", "w", stdout);
  }
  cin >> N;
  recurse(N, 0, 0);
  cout << ans.first << ' ' << ans.second << '\n';
}
