#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> ans;
long long cube(long long x) { return x * x * x; }
void f(long long m, long long blocks, long long X) {
  if (m == 0) {
    ans = max(ans, make_pair(blocks, X));
    return;
  }
  int x = 1;
  while (cube(x + 1) <= m) x++;
  f(m - cube(x), blocks + 1, X + cube(x));
  if (x > 1) f(cube(x) - 1 - cube(x - 1), blocks + 1, X + cube(x - 1));
}
int main(void) {
  long long m;
  cin >> m;
  f(m, 0, 0);
  cout << ans.first << " " << ans.second << endl;
  return 0;
}
