#include <bits/stdc++.h>
using namespace std;
long long pow3(long long x) { return x * x * x; }
long long h, x;
void Dfs(long long m, long long step, long long sum) {
  if (m == 0) {
    if (h < step || (h == step && x < sum)) {
      h = step;
      x = sum;
    }
    return;
  }
  long long p = 1;
  while (pow3(p) <= m) p++;
  p--;
  Dfs(m - pow3(p), step + 1, sum + pow3(p));
  Dfs(pow3(p) - 1 - pow3(p - 1), step + 1, sum + pow3(p - 1));
}
int main() {
  long long m;
  scanf("%lld", &m);
  Dfs(m, 0, 0);
  printf("%lld %lld", h, x);
  return 0;
}
