#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100000 + 10;
const int INF = INT_MAX;
const double EXP = 0.0001;
void files() { freopen("output.txt", "w", stdout); }
long long pow3(long long x) { return x * x * x; }
pair<int, long long> answer;
void solution(long long m, int step, long long cur) {
  if (m == 0) {
    answer = max(answer, make_pair(step, cur));
    return;
  }
  long long x = 1;
  while (pow3(x) <= m) x++;
  x--;
  solution(m - pow3(x), step + 1, cur + pow3(x));
  if (x > 0) solution(pow3(x) - 1 - pow3(x - 1), step + 1, cur + pow3(x - 1));
}
int main() {
  ios_base::sync_with_stdio(false);
  long long m;
  cin >> m;
  solution(m, 0, 0);
  cout << answer.first << " " << answer.second;
  return 0;
}
