#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-10;
const int inf = 0x7f7f7f7f;
const double pi = acos(-1);
int p2, q2, p1, ep, q1;
const int INF = 0x3f3f3f3f;
const int maxn = 1100;
pair<int, long long> ans;
long long p3(long long x) { return x * x * x; }
void dfs(long long n, int p, long long z) {
  if (!n) {
    ans = max(ans, make_pair(p, z));
    return;
  };
  int t = 1;
  while (p3(t + 1) <= n) t++;
  dfs(n - p3(t), p + 1, z + p3(t));
  dfs(p3(t) - p3(t - 1) - 1, p + 1, z + p3(t - 1));
}
int main() {
  long long n;
  while (~scanf("%lld", &n)) {
    ans.first = ans.second = 0;
    dfs(n, 0, 0);
    printf("%d %lld\n", ans.first, ans.second);
  }
  return 0;
}
