#include <bits/stdc++.h>
using namespace std;
long long m;
pair<long long, long long> res = {0, 0};
long long p(long long x) { return x * x * x; }
void solve(long long m, long long x, long long y) {
  if (m == 0) {
    res = max(res, make_pair(x, y));
    return;
  }
  long long lt = 1;
  while (p(lt + 1) <= m) ++lt;
  solve(m - p(lt), x + 1, y + p(lt));
  if (lt - 1 >= 0) {
    solve(p(lt) - 1 - p(lt - 1), x + 1, y + p(lt - 1));
  }
}
int main() {
  if (fopen("test.inp", "r")) {
    freopen("test.inp", "r", stdin);
  }
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> m;
  solve(m, 0, 0);
  cout << res.first << " " << res.second;
}
