#include <bits/stdc++.h>
using namespace std;
long long m;
bool operator>(pair<int, long long> x, pair<int, long long> y) {
  if (x.first == y.first) return x.second > y.second;
  return x.first > y.first;
}
pair<int, long long> solve(long long x) {
  if (!x) return make_pair(0, 0);
  if (x == 1) return make_pair(1, 1);
  long long s = (int)pow(x, 1.0 / 3);
  if ((s + 1) * (s + 1) * (s + 1) == x) s++;
  long long w = (s - 1) * (s - 1) * (s - 1);
  if (s * s * s == x) {
    pair<int, long long> g = solve(x - w - 1);
    return make_pair(g.first + 1, g.second + w);
  }
  long long r = s * s * s;
  long long s1 = x - r, s2 = r - w - 1;
  pair<int, long long> a1 = solve(s1), a2 = solve(s2);
  a1.first++, a2.first++, a1.second += r, a2.second += w;
  return a1 > a2 ? a1 : a2;
}
int main() {
  scanf("%I64d", &m);
  pair<int, long long> ans = solve(m);
  printf("%d %I64d", ans.first, ans.second);
  return 0;
}
