#include <bits/stdc++.h>
using namespace std;
struct node {
  long long first, second;
} ans;
long long max(long long x, long long y) { return x > y ? x : y; }
long long temp = 0;
long long sanci(long long x) { return x * x * x; }
void dfs(long long m, long long num, long long x) {
  if (m == 0) {
    if (temp < num) {
      ans.first = num;
      ans.second = x;
      temp = num;
    }
    return;
  }
  long long cnt = 1;
  while (sanci(cnt + 1) <= m) cnt++;
  dfs(m - sanci(cnt), num + 1, x + sanci(cnt));
  if (cnt - 1 >= 1) {
    dfs(sanci(cnt) - sanci(cnt - 1) - 1, num + 1, x + sanci(cnt - 1));
  }
}
int main() {
  long long m, n;
  scanf("%I64d", &m);
  dfs(m, 0, 0);
  printf("%lld %lld\n", ans.first, ans.second);
}
