#include <bits/stdc++.h>
using namespace std;
long long int pow(long long int x) { return x * x * x; }
pair<long long int, long long int> ans;
void f1(long long int n, long long int l, long long int v) {
  if (n == 0) {
    ans = max(ans, make_pair(l, v));
    return;
  }
  long long int a = 1;
  while (pow(a + 1) <= n) a++;
  f1(n - pow(a), l + 1, v + pow(a));
  if ((a - 1) >= 0) f1(pow(a) - 1 - pow(a - 1), l + 1, v + pow(a - 1));
}
int main() {
  long long int a, b, c, d, i, j, k, l, m, n;
  cin >> n;
  f1(n, 0, 0);
  cout << ans.first << " " << ans.second << endl;
  return 0;
}
