#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e5 + 4;
const int inf = (int)1e9 + 7;
const long double eps = 1e-7;
const int K = 12;
long long cube(long long x) { return x * x * x; }
pair<long long, long long> ans;
void brut(long long n, long long k, long long d) {
  if (n == 0) {
    ans = max(ans, make_pair(k, d));
    return;
  }
  long long l = 1, r = N;
  for (; r > l;) {
    long long m = (l + r) / 2 + 1;
    if (cube(m) <= n) {
      l = m;
    } else {
      r = m - 1;
    }
  }
  brut(n - cube(l), k + 1, d + cube(l));
  if (l > 1) {
    brut(cube(l) - 1 - cube(l - 1), k + 1, d + cube(l - 1));
  }
}
int main() {
  long long n;
  cin >> n;
  brut(n, 0, 0);
  cout << ans.first << ' ' << ans.second;
  return 0;
}
