#include <bits/stdc++.h>
using namespace std;
const int MAX = 100005;
pair<int, long long> rec(long long m, int steps, long long ans) {
  if (m == 0) return make_pair(steps, ans);
  long long x = 1;
  while ((x + 1) * (x + 1) * (x + 1) <= m) x++;
  if (x - 1 >= 0)
    return max(rec(m - x * x * x, steps + 1, ans + x * x * x),
               rec(x * x * x - 1 - (x - 1) * (x - 1) * (x - 1), steps + 1,
                   ans + (x - 1) * (x - 1) * (x - 1)));
  else
    return rec(m - x * x * x, steps + 1, ans + x * x * x);
}
int main() {
  long long m;
  cin >> m;
  pair<int, long long> p = rec(m, 0, 0);
  cout << p.first << ' ' << p.second << endl;
  return 0;
}
