#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:102400000,102400000")
long long q(int x) { return (long long)x * x * x; }
int a[] = {7, 3, 2};
void check(long long x) {
  int i;
  for (i = 1;; ++i)
    if (q(i) > x) break;
  --i;
  int cnt = 0;
  for (; i > 0; --i) {
    if (x >= q(i)) {
      cnt += x / q(i);
      x -= (x / q(i)) * q(i);
    }
  }
  printf("cnt %d\n", cnt);
}
map<long long, pair<int, long long> > mp;
pair<int, long long> gao(long long x) {
  if (x == 0) return make_pair(0, 0);
  if (mp.count(x)) return mp[x];
  int t = pow(x * 1.0 + 0.5, 1.0 / 3);
  pair<int, long long> ans = gao(q(t) - 1);
  pair<int, long long> tmp = gao(x - q(t));
  tmp.first += 1, tmp.second += q(t);
  ans = max(ans, tmp);
  mp[x] = ans;
  return ans;
}
int main() {
  long long m;
  scanf("%I64d", &m);
  pair<int, long long> ans = gao(m);
  printf("%d %I64d\n", ans.first, ans.second);
}
