#include <bits/stdc++.h>
using namespace std;
const int MAX = 1000005;
const int MOD = 1e9 + 7;
long long p3(long long v) { return v * v * v; }
pair<int, long long> solve(long long m, long long sum, long long steps) {
  if (m <= 7) return make_pair(m + steps, m + sum);
  long long cp3 = 1;
  while (p3(cp3 + 1) <= m) cp3++;
  return max(solve(m - p3(cp3), sum + p3(cp3), steps + 1),
             solve(p3(cp3) - 1 - p3(cp3 - 1), sum + p3(cp3 - 1), steps + 1));
}
int main() {
  long long m;
  cin >> m;
  pair<int, long long> ans = solve(m, 0, 0);
  cout << ans.first << " " << ans.second << endl;
}
