#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 555;
long long int c(long long int i) { return i * i * i; }
pair<long long int, long long int> ans;
void go(long long int val, pair<long long int, long long int> curr) {
  if (val == 0) {
    ans = max(ans, curr);
    return;
  }
  long long int i = 1;
  while (c(i + 1) <= val) {
    i++;
  }
  pair<long long int, long long int> temp = curr;
  temp.first++, temp.second += c(i);
  go(val - c(i), temp);
  if (i > 1) {
    curr.first++, curr.second += c(i - 1);
    go(c(i) - 1 - c(i - 1), curr);
  }
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int m;
  cin >> m;
  go(m, make_pair(0, 0));
  cout << ans.first << " " << ans.second;
  return 0;
}
