#include <bits/stdc++.h>
using namespace std;
char buf[32000000], *pt = buf, *o = buf;
int getint() {
  int f = 1, x = 0;
  while ((*pt != '-') && (*pt < '0' || *pt > '9')) pt++;
  if (*pt == '-')
    f = -1, pt++;
  else
    x = *pt++ - 48;
  while (*pt >= '0' && *pt <= '9') x = x * 10 + *pt++ - 48;
  return x * f;
}
char getch() {
  char ch;
  while (*pt < 'A' || *pt > 'Z') pt++;
  ch = *pt;
  pt++;
  return ch;
}
long long m, ans1, ans2, pw[100010];
void dfs(long long left, long long u, long long v) {
  if (left == 0) {
    if (u > ans1 || u == ans1 && v > ans2) ans1 = u, ans2 = v;
    return;
  }
  int x = upper_bound(pw + 1, pw + 100010, left) - pw - 1;
  dfs(left - pw[x], u + 1, v + pw[x]);
  if (x > 1) {
    dfs(pw[x] - 1 - pw[x - 1], u + 1, v + pw[x - 1]);
  }
}
int main() {
  for (int i = 1; i < 100010; ++i) pw[i] = 1LL * i * i * i;
  long long m;
  cin >> m;
  dfs(m, 0, 0);
  cout << ans1 << " " << ans2 << endl;
  return 0;
}
