#include <bits/stdc++.h>
using namespace std;
map<long long, pair<long long, long long> > mp;
long long pw3(long long x) { return x * x * x; }
pair<long long, long long> MAX(pair<long long, long long> x,
                               pair<long long, long long> y) {
  if (x.first != y.first) {
    if (x.first > y.first)
      return x;
    else
      return y;
  } else {
    if (x.second > y.second)
      return x;
    else
      return y;
  }
}
pair<long long, long long> dfs(long long m) {
  if (mp.count(m) != 0) return mp[m];
  if (m == 0) {
    return make_pair(0, 0);
  }
  long long x = (long long)pow(m, 1.0 / 3);
  while (pw3(x + 1) <= m) x++;
  pair<long long, long long> ret1 = dfs(m - pw3(x));
  ret1.first += 1;
  ret1.second += pw3(x);
  pair<long long, long long> ret2 = dfs(pw3(x) - 1);
  return mp[m] = MAX(ret1, ret2);
}
void work(long long m) {
  pair<long long, long long> ans = dfs(m);
  printf("%I64d %I64d\n", ans.first, ans.second);
}
int main() {
  long long m;
  scanf("%lld", &m);
  work(m);
}
