#include <bits/stdc++.h>
using namespace std;
using LL = long long;
template <typename T>
using V = vector<T>;
template <typename T, typename S>
using P = pair<T, S>;
template <class T>
using min_heap = priority_queue<T, std::vector<T>, std::greater<T>>;
using LD = long double;
template <typename T, typename S>
void check(T& a, S& b) {
  if (a >= b) {
    a %= b;
  }
}
template <typename T>
T gcd(T u, T v) {
  if (u == v) return u;
  if (u == 0) return v;
  if (v == 0) return u;
  if (~u & 1) {
    if (v & 1)
      return gcd(u >> 1, v);
    else
      return gcd(u >> 1, v >> 1) << 1;
  }
  if (~v & 1) return gcd(u, v >> 1);
  if (u > v) return gcd((u - v) >> 1, v);
  return gcd((v - u) >> 1, u);
}
map<LL, P<int, LL>> Map;
LL cube(LL a) { return a * 1LL * a * 1LL * a; }
int root(LL n) {
  LL l = 1, r = n;
  while (l < r) {
    LL mid = (l + r + 1) >> 1;
    LD x = mid * 1.000 * mid * 1.0000 * mid;
    if (x <= n)
      l = mid;
    else
      r = mid - 1;
  }
  return l;
}
P<int, LL> t;
P<int, LL> solve(LL m, P<int, LL> cur) {
  if (!m) {
    return cur;
  }
  LL r = root(m);
  auto ans = solve(m - cube(r), {cur.first + 1, cur.second + cube(r)});
  if (r >= 1) {
    ans = max(ans, solve(cube(r) - 1 - cube(r - 1),
                         {cur.first + 1, cur.second + cube(r - 1)}));
  }
  return ans;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cerr.tie(NULL);
  ;
  LL m;
  cin >> m;
  auto ans = solve(m, {0, 0LL});
  cout << ans.first << ' ' << ans.second << '\n';
  cerr << "Time elapsed :" << clock() * 1000.0 / CLOCKS_PER_SEC << " ms"
       << '\n';
  return 0;
}
