#include <bits/stdc++.h>
using namespace std;
long long int cube(long long int n) { return n * n * n; }
pair<long long int, long long int> ans;
void dfs(long long int num, long long int step, long long int make) {
  if (num == 0) {
    if (ans.first < step) {
      ans = make_pair(step, make);
    } else if (ans.first <= step) {
      if (ans.second < make) {
        ans = make_pair(step, make);
      }
    }
    return;
  }
  long long int tar = 1;
  while (cube(tar + 1) <= num) {
    tar++;
  }
  dfs(num - cube(tar), step + 1, make + cube(tar));
  if (tar > 1) {
    dfs(cube(tar) - 1 - cube(tar - 1), step + 1, make + cube(tar - 1));
  }
  return;
}
int main() {
  long long int m;
  cin >> m;
  ans.first = 0;
  ans.second = 0;
  dfs(m, 0, 0);
  cout << ans.first << " " << ans.second << endl;
}
