#include <bits/stdc++.h>
using namespace std;
pair<long long int, long long int> p;
long long int pw(long long int x) { return x * x * x; }
void rec(long long int m, long long int x, long long int y) {
  if (!m) {
    p = max(p, {x, y});
    return;
  }
  long long int a = 1;
  while (pw(a + 1) <= m) a++;
  rec(m - pw(a), x + 1, y + pw(a));
  if (a > 1) rec(pw(a) - pw(a - 1) - 1, x + 1, y + pw(a - 1));
}
int main() {
  long long int m;
  cin >> m;
  rec(m, 0, 0);
  cout << p.first << " " << p.second << endl;
}
