#include <bits/stdc++.h>
using namespace std;
void init() {}
long long power(long long x) { return x * x * x; }
pair<long long, long long> recur(long long m) {
  if (m == 0) return {0, 0};
  long long x = 1;
  while (power(x) <= m) x++;
  --x;
  pair<long long, long long> res;
  pair<long long, long long> p = recur(m - power(x));
  res.first = p.first + 1;
  res.second = p.second + power(x);
  if (x - 1 >= 0) {
    pair<long long, long long> q = recur(power(x) - 1 - power(x - 1));
    pair<long long, long long> t;
    t.first = q.first + 1;
    t.second = q.second + power(x - 1);
    res = max(res, t);
  }
  return res;
}
int main() {
  init();
  long long m;
  scanf("%I64d", &m);
  pair<long long, long long> p = recur(m);
  cout << p.first << " " << p.second;
  return 0;
}
