#include <bits/stdc++.h>
using namespace std;
long long m;
pair<long long, long long> res;
long long cub(long long a) { return a * a * a; }
void attemp(long long m, long long num, long long V) {
  if (m == 0) {
    res = max(res, make_pair(num, V));
    return;
  }
  int x = 0;
  while (cub(x + 1) <= m) x++;
  attemp(m - cub(x), num + 1, V + cub(x));
  if (cub(x) - 1 - cub(x - 1) < 0) return;
  attemp(cub(x) - 1 - cub(x - 1), num + 1, V + cub(x - 1));
}
int main() {
  scanf("%I64d", &m);
  attemp(m, 0, 0);
  printf("%I64d %I64d", res.first, res.second);
}
