#include <bits/stdc++.h>
using namespace std;
template <typename T>
void read(T &x) {
  char ch;
  x = 0;
  bool flag = false;
  ch = getchar();
  while (ch != '-' && (ch > '9' || ch < '0')) ch = getchar();
  while ((ch <= '9' && ch >= '0') || ch == '-') {
    if (ch == '-')
      flag = true;
    else
      x = x * 10 + ch - '0';
    ch = getchar();
  }
  if (flag) x *= -1;
}
template <typename T>
void read(T &x, T &y) {
  read(x);
  read(y);
}
long long n, t, m;
inline long long cub(long long x) { return x * x * x; }
void dfs(long long mm, long long step, long long rr) {
  if (mm == 0) {
    if (t < step || (t == step && m < rr)) {
      t = step;
      m = rr;
    }
    return;
  }
  long long p = 1;
  while (cub(p + 1) <= mm) p++;
  dfs(mm - cub(p), step + 1, rr + cub(p));
  if (p > 1) dfs(cub(p) - 1 - cub(p - 1), step + 1, rr + cub(p - 1));
}
int main() {
  read(n);
  dfs(n, 0, 0);
  printf("%lld %lld\n", t, m);
  return 0;
}
