#include <bits/stdc++.h>
const int INF = 0x7F7F7F7F;
const double EPS = 1e-10;
const long long mod7 = 1e9 + 7;
const long long mod9 = 1e9 + 9;
using namespace std;
inline long long rit() {
  long long f = 0, key = 1;
  char c;
  do {
    c = getchar();
    if (c == '-') key = -1;
  } while (c < '0' || c > '9');
  do {
    f = f * 10 + c - '0';
    c = getchar();
  } while (c >= '0' && c <= '9');
  return f * key;
}
inline void fprt(double f) { printf("%.08lf", f); }
long long sqr[100005];
void init() {
  for (int i = 0; i < 100001; i++) {
    sqr[i] = (long long)i * i * i;
  }
}
inline int ask(long long x) {
  int mid, p, q, tmp = 0;
  p = 1;
  q = 100000;
  while (p <= q) {
    mid = (p + q) / 2;
    if (sqr[mid] <= x) {
      tmp = max(tmp, mid);
      p = mid + 1;
    } else {
      q = mid - 1;
    }
  }
  return tmp;
}
pair<long long, long long> ans;
void dfs(long long m, int num, long long sum) {
  if (num > ans.first)
    ans = make_pair(num, sum);
  else if (num == ans.first && sum > ans.second)
    ans = make_pair(num, sum);
  if (m == 0) return;
  int f = ask(m);
  dfs(m - sqr[f], num + 1, sum + sqr[f]);
  dfs(sqr[f] - 1 - sqr[f - 1], num + 1, sum + sqr[f - 1]);
}
long long m;
void read() {
  m = rit();
  ;
  dfs(m, 0, 0);
}
void solve() { cout << ans.first << ' ' << ans.second << endl; }
int main() {
  int nn = 1;
  while (nn--) {
    init(), read(), solve();
  }
  return 0;
}
