#include <bits/stdc++.h>
using std::abs;
using std::bitset;
using std::cerr;
using std::cin;
using std::copy;
using std::cout;
using std::deque;
using std::endl;
using std::fill;
using std::fixed;
using std::function;
using std::greater;
using std::iota;
using std::istream;
using std::iter_swap;
using std::lower_bound;
using std::make_pair;
using std::make_tuple;
using std::map;
using std::max;
using std::max_element;
using std::min;
using std::min_element;
using std::multiset;
using std::next_permutation;
using std::nth_element;
using std::ostream;
using std::pair;
using std::priority_queue;
using std::queue;
using std::reverse;
using std::rotate;
using std::set;
using std::shuffle;
using std::sort;
using std::string;
using std::swap;
using std::tie;
using std::tuple;
using std::unique;
using std::unordered_map;
using std::unordered_set;
using std::upper_bound;
using std::vector;
int const INF = 100 + (int)1e9;
long long const INFL = 100 + (long long)1e18;
long double const PI = 3.141592653589793238462643L;
std::mt19937 mt19937(960172);
long long rnd(long long x, long long y) {
  static auto gen =
      std::bind(std::uniform_int_distribution<long long>(), mt19937);
  return gen() % (y - x + 1) + x;
}
bool is_prime(long long x) {
  if (x <= 1) return 0;
  for (long long y = 2; y * y <= x; ++y)
    if (x % y == 0) return 0;
  return 1;
}
long long sqr(int a) { return (long long)a * a; }
long double sqr(long double a) { return a * a; }
long long sqr(long long a) { return a * a; }
long long gcd(long long a, long long b) {
  while (b > 0) {
    long long t = a % b;
    a = b;
    b = t;
  }
  return a;
}
pair<int, long long> ans;
void go(long long m, int cn, long long sum) {
  ans = max(ans, make_pair(cn, sum));
  if (m == 0) return;
  long long x = 1;
  while (x * x * x <= m) ++x;
  --x;
  go(m - x * x * x, cn + 1, sum + x * x * x);
  if (x > 1)
    go(x * x * x - 1 - (x - 1) * (x - 1) * (x - 1), cn + 1,
       sum + (x - 1) * (x - 1) * (x - 1));
}
void solve() {
  long long m;
  cin >> m;
  go(m, 0, 0);
  cout << ans.first << ' ' << ans.second << '\n';
}
int main() {
  cout.precision(15);
  cout << fixed;
  cerr.precision(6);
  cerr << fixed;
  int tcn = 1;
  for (int tn = 1; tn <= tcn; ++tn) solve();
}
