#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> operator+(pair<long long, long long> a,
                                     pair<long long, long long> b) {
  return make_pair(a.first + b.first, a.second + b.second);
}
map<long long, pair<long long, long long> > mp;
pair<long long, long long> dfs(long long x) {
  if (mp.find(x) != mp.end()) return mp[x];
  if (x == 0) return make_pair(0, 0);
  long long l = 1, r = 100000;
  while (l < r) {
    long long m = (l + r + 1) >> 1;
    if (m * m * m <= x)
      l = m;
    else
      r = m - 1;
  }
  long long k = l * l * l;
  return mp[x] = max(dfs(x % k) + make_pair(x / k, x / k * k),
                     dfs(k - 1) + make_pair(x / k - 1, (x / k - 1) * k));
}
int main() {
  long long m;
  scanf("%I64d", &m);
  pair<long long, long long> res = dfs(m);
  printf("%I64d %I64d\n", res.first, res.second);
  return 0;
}
