#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T poww(T b, T p) {
  long long a = 1;
  while (p) {
    if (p & 1) {
      a = (a * b);
    }
    p >>= 1;
    b = (b * b);
  }
  return a;
}
template <class T>
inline T gcd(T a, T b) {
  if (b > a) return gcd(b, a);
  return ((b == 0) ? a : gcd(b, a % b));
}
map<long long, pair<long long, long long> > dp;
pair<long long, long long> solve(long long m, int store = 0) {
  if (m < 8) return make_pair(m, m);
  if (store) {
    if (dp.find(m) != dp.end()) return dp[m];
  }
  long long i, j, l, r, md, h = 1;
  l = 1, r = min((long long)100003, m);
  while (l <= r) {
    md = (l + r) / 2;
    if (md * md * md < m) {
      l = md + 1;
      h = md * md * md;
    } else if (md * md * md == m) {
      h = md * md * md;
      break;
    } else
      r = md - 1;
  }
  pair<long long, long long> tans1, tans2, tmp = solve(m % h), ans;
  tans1 = make_pair(m / h + tmp.first, m - (m % h) + tmp.second);
  tmp = solve(h - 1, 1);
  tans2 = make_pair(m / h - 1 + tmp.first, m - m % h - h + tmp.second);
  if (tans1.first == tans2.first)
    ans = tans1.second > tans2.second ? tans1 : tans2;
  else if (tans1.first > tans2.first)
    ans = tans1;
  else
    ans = tans2;
  if (store) dp[m] = ans;
  return ans;
}
int main() {
  long long m;
  cin >> m;
  pair<long long, long long> ans = solve(m);
  cout << ans.first << " " << ans.second << "\n";
}
