#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> ans;
void solve(long long m, long long steps, long long substract) {
  if (m == 0) {
    ans = max(ans, make_pair(steps, substract));
    return;
  }
  long long cur = 1ll;
  while (cur * cur * cur <= m) cur++;
  cur--;
  solve(m - (cur * cur * cur), steps + 1, substract + cur * cur * cur);
  if (cur - 1 > 0)
    solve(cur * cur * cur - 1 - ((cur - 1) * (cur - 1) * (cur - 1)), steps + 1,
          substract + (cur - 1) * (cur - 1) * (cur - 1));
}
int main() {
  long long n;
  cin >> n;
  ans = make_pair(0, 0);
  solve(n, 0, 0);
  cout << ans.first << " " << ans.second << '\n';
  return 0;
}
