#include <bits/stdc++.h>
using namespace std;
tuple<long long, long long, long long> best[100001];
long long cbrt(long long a) {
  long long lo = 0, hi = 1000000;
  while (lo != hi - 1) {
    long long md = lo + (hi - lo + 1) / 2;
    long long md3 = md * md * md;
    (md3 > a ? hi : lo) = md;
  }
  return lo;
}
void init(long long n) {
  long long cur, nex = 1;
  best[0] = make_tuple(0, 0, 0);
  for (long long i = 1; i <= n; ++i) {
    cur = nex;
    nex = (i + 1) * (i + 1) * (i + 1);
    long long dv = (nex - 1) / cur, md = (nex - 1) % cur;
    if (md < get<0>(best[i - 1]))
      best[i] = make_tuple(
          (dv - 1) * cur + get<0>(best[i - 1]),
          dv <= 1 ? get<1>(best[i - 1]) : (dv - 2) * cur + get<0>(best[i - 1]),
          (dv - 1) + get<2>(best[i - 1]));
    else
      best[i] = make_tuple(
          dv * cur + get<0>(best[i - 1]),
          dv <= 0 ? get<1>(best[i - 1]) : (dv - 1) * cur + get<0>(best[i - 1]),
          dv + get<2>(best[i - 1]));
  }
}
pair<long long, long long> solve(long long m) {
  long long cbr = cbrt(m);
  long long cb = cbr * cbr * cbr;
  pair<long long, long long> ret;
  while (m) {
    long long dv = m / cb, md = m % cb;
    if (dv == 0) {
    } else if (md >= get<1>(best[cbr - 1])) {
      ret.first += dv * cb;
      ret.second += dv;
      m = md;
    } else {
      ret.first += (dv - 1) * cb;
      ret.second += dv - 1;
      m = cb - 1;
    }
    --cbr;
    cb = cbr * cbr * cbr;
  }
  return ret;
}
int main() {
  long long m;
  cin >> m;
  init(100000);
  auto r = solve(m);
  cout << r.second << " " << r.first << endl;
}
