#include <bits/stdc++.h>
using namespace std;
long long a, b;
void brute(long long x, long long cnt, long long tot) {
  if (x == 0) {
    if (cnt > a) {
      a = cnt;
      b = tot;
    } else if (cnt == a) {
      if (tot > b) {
        a = cnt;
        b = tot;
      }
    }
    return;
  }
  long long y = 1;
  while (y * y * y <= x) {
    y++;
  }
  y--;
  brute(x - y * y * y, cnt + 1, tot + y * y * y);
  if (y - 1 > 0)
    brute(y * y * y - 1 - (y - 1) * (y - 1) * (y - 1), cnt + 1,
          tot + (y - 1) * (y - 1) * (y - 1));
}
int main() {
  long long m;
  cin >> m;
  brute(m, 0, 0);
  cout << a << " " << b << endl;
}
