#include <bits/stdc++.h>
using namespace std;
long long cbe(long long x) { return x * x * x; }
pair<int, long long> b = make_pair(0, 0);
void dfs(long long x, int y, long long z) {
  if (x == 0) {
    b = max(b, make_pair(y, z));
    return;
  }
  long long t = 1;
  while (cbe(t + 1) <= x) ++t;
  dfs(x - cbe(t), y + 1, z + cbe(t));
  dfs(cbe(t) - 1 - cbe(t - 1), y + 1, z + cbe(t - 1));
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long a;
  cin >> a;
  dfs(a, 0, 0);
  cout << b.first << " " << b.second;
}
