#include <bits/stdc++.h>
using namespace std;
long long getCub(long long x) {
  if (x == 0) return 0;
  long long y = 1;
  while (y * y * y <= x) y++;
  return y - 1;
}
int getCount(long long x) {
  if (x < 8) return (int)x;
  long long y = getCub(x);
  long long z = x - y * y * y;
  y--;
  return 1 + getCount(max(z, 3 * y * y + 3 * y));
}
int main() {
  long long x;
  scanf("%lld", &x);
  int ans2 = getCount(x);
  long long ans1 = 0;
  int lst = ans2;
  while (x > 0) {
    if (x < 8) {
      ans1 += x;
      break;
    }
    lst--;
    long long y = getCub(x);
    long long z = x - y * y * y;
    if (lst == getCount(z)) {
      ans1 += y * y * y;
      x = z;
    } else {
      y--;
      x = 3 * y * y + 3 * y;
      ans1 += y * y * y;
    }
  }
  printf("%d %lld\n", ans2, ans1);
  return 0;
}
