#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> best;
long long p3(long long a) { return a * a * a; }
void rec(long long m, long long steps, long long subtracted) {
  if (!m) {
    best = max(best, make_pair(steps, subtracted));
    return;
  }
  long long x = 1;
  while (p3(x + 1) <= m) x++;
  rec(m - p3(x), steps + 1, subtracted + p3(x));
  if (x >= 1) {
    rec(p3(x) - 1 - p3(x - 1), steps + 1, subtracted + p3(x - 1));
  }
}
int main() {
  long long m;
  cin >> m;
  rec(m, 0, 0);
  cout << best.first << ' ' << best.second << endl;
}
