#include <bits/stdc++.h>
using namespace std;
long long pow(long long a, long long b, long long M) {
  long long t = 1;
  for (a %= M; b; b >>= 1) {
    if (b & 1) t = t * a % M;
    a = a * a % M;
  }
  return t;
}
inline int getc() {
  static const int N = 222;
  static char buf[N];
  static int n = 0, p = 0;
  if (p == n) p = 0, n = fread(buf, 1, N, stdin);
  if (p == n) exit(0);
  return buf[p++];
}
inline int R(int& first) {
  int f = 1, c = getc();
  first = 0;
  while (c <= 32) c = getc();
  if (c == '-') f = -1, c = getc();
  for (; '0' <= c && c <= '9'; c = getc()) first = first * 10 + c - '0';
  first *= f;
}
pair<int, long long> dfs(long long m) {
  if (m == 0) return make_pair(0, 0);
  if (m < 0) return make_pair(-100, 0);
  long long t = pow(m, 1.0 / 3);
  pair<int, long long> l =
      dfs(min(m - t * t * t, (t + 1) * (t + 1) * (t + 1) - t * t * t - 1));
  l.first = l.first + 1;
  l.second = l.second + t * t * t;
  t--;
  pair<int, long long> r =
      dfs(min(m - t * t * t, (t + 1) * (t + 1) * (t + 1) - t * t * t - 1));
  r.first = r.first + 1;
  r.second = r.second + t * t * t;
  return max(l, r);
}
int main() {
  long long m;
  cin >> m;
  cout << dfs(m).first << ' ' << dfs(m).second << endl;
}
