#include <bits/stdc++.h>
using namespace std;
long long M;
pair<long long, long long> ans = make_pair(0, 0);
void solve(long long m, long long a, long long b) {
  if (m == 0) {
    if (a > ans.first)
      ans = make_pair(a, b);
    else if (a == ans.first)
      if (b > ans.second) ans = make_pair(a, b);
    return;
  }
  long long x = 1;
  while (((x + 1) * (x + 1) * (x + 1)) <= m) x++;
  solve(m - x * x * x, a + 1, b + x * x * x);
  if (x - 1 >= 0)
    solve((x * x * x) - 1 - (x - 1) * (x - 1) * (x - 1), a + 1,
          b + (x - 1) * (x - 1) * (x - 1));
}
int main() {
  cin >> M;
  solve(M, 0, 0);
  cout << ans.first << ' ' << ans.second << endl;
}
