1000000000000000
 994
 200385
 3842529393411
 8
 409477218238717
 2
 419477218238718
 909383000
 7
 999088000000000
 265
 415000000238718
 780869426483087
 9
 850085504652042
 567000123
 980123123123123
 409477218238719
 385925923480002
 999998169714888
 936302451686999
 114
 999999993700000
 108000000057
 409477218238716
 112
 1
 409477218238718
 999971000299999
 409477318238718
 735412349812385
 113
 999999999999999
 123830583943
 899990298504716
 936302451687000
 995
 990000000000000
 936302451687001
 999986542686123
 850085504652041

18 999999993541753
 12 941
 14 200355
 17 3842529383076
 7 7
 17 409477218238717
 2 2
 18 419466459294818
 16 909381874
 7 7
 18 999087986204952
 11 212
 18 414993991790735
 18 780869407920631
 7 7
 18 850085504652042
 16 566998782
 18 980123123116482
 18 409477218238718
 17 385925923479720
 18 999998150030846
 18 936302448662019
 11 114
 18 999999993541753
 17 107986074062
 17 409477218238710
 10 106
 1 1
 18 409477218238718
 18 999969994441746
 18 409477218238718
 18 735409591249436
 10 113
 18 999999993541753
 17 123830561521
 18 899973747835553
 18 936302448662019
 12 995
 18 989983621692990
 18 936302448662019
 18 999969994441746
 18 850085504650655

import java.io.*;
import java.util.Arrays;
import static java.lang.Math.*;

public class ProblemD {
  
  public static void main(String[] args) throws IOException {
    init();
    new ProblemD().run();
    out.flush();
    out.close();
  }
  
  static void init() throws IOException {
    in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
    out = new PrintWriter(new OutputStreamWriter(System.out));
    in.ordinaryChars(0, 65535);
    in.wordChars(0, 65535);
    in.whitespaceChars(' ', ' ');
    in.whitespaceChars('\n', '\n');
    in.whitespaceChars('\r', '\r');
  }

  // класс для пар
  class Pair<L, R> implements Comparable{
    private final L X;
    private final R Y;

    public Pair(L X, R Y) {
      this.X = X;
      this.Y = Y;
    }

    public L getX() {
      return X;
    }

    public R getY() {
      return Y;
    }

    @Override
    public int hashCode() {
      return X.hashCode() ^ Y.hashCode();
    }

    @Override
    public boolean equals(Object o) {
      if (!(o instanceof Pair)) return false;
      Pair pairo = (Pair) o;
      return X.equals(pairo.getX()) && Y.equals(pairo.getY());
    }

    @Override
    public String toString() {
      return "Pair{" +
              "X=" + X +
              ", Y=" + Y +
              '}';
    }

    @Override
    public int compareTo(Object o) {
      Pair<L, R> oPair = (Pair<L, R>)o;
      Comparable cX = (Comparable)this.X;
      Comparable cY = (Comparable)this.Y;
      if (cX.compareTo(oPair.X) > 0 || (cX.compareTo(oPair.X) == 0 && cY.compareTo(oPair.Y) > 0)) {
        return 1;
      } else if (cX.compareTo(oPair.X) == 0 && cY.compareTo(oPair.Y) == 0) {
        return 0;
      } else {
       return -1;
      }
    }
  }
  
  static final long INFL = 200000000000000000L;
  static final int INF = 2000000000;
  static final boolean DEBUG = true;
  
  static StreamTokenizer in;
  static PrintWriter out;
  
  static void print(String s) {
    print(s, 0);
  }
  
  static void print(String s, int debug) {
    if (debug == 0 || DEBUG) {
      out.print(s);
    }
  }
  
  static void println(String s) {
    println(s, 0);
  }
  
  static void println(String s, int debug) {
    if (debug == 0 || DEBUG) {
      out.println(s);
    }
  }
  
  static void printArray(int[] arr) {
    println(Arrays.toString(arr));
  }
  
  static void printArray(char[] arr) {
    println(Arrays.toString(arr));
  }
  
  static void printArray(String[] arr) {
    println(Arrays.toString(arr));
  }
  
  static char[] inChars;
  static int inCharsInd;
  
  static String next() throws IOException {
    in.nextToken();
    return in.sval;
  }
  
  static char nextChar() throws IOException {
    while (inChars == null || inCharsInd >= inChars.length) {
      inChars = next().toCharArray();
      inCharsInd = 0;
    }
    return inChars[inCharsInd++];
  }
  
  static int nextInt() throws IOException {
    return Integer.valueOf(next());
  }
  
  static double nextDouble() throws IOException {
    return Double.valueOf(next());
  }
  
  static long nextLong() throws IOException {
    return Long.valueOf(next());
  }
  
  private void run() throws IOException {
    solve();
  }

  long M;
  Pair <Long, Long> best = new Pair<>(0L, 0L);


  private void solve() throws IOException {
    M = nextLong();
    recur(M, 0, 0);
    out.println(best.getX() + " " + best.getY());
  }


  private void recur(long M, long steps, long substracted) {
//    out.println(M);
    if (M == 0){
      Pair p = new Pair(steps, substracted);
      best = (best.compareTo(p)>=0)?best:p;
      return;
    }
    long sqrt = 1;
    while(pow(sqrt+1, 3) <= M) sqrt++;
    long myPow = (long)pow(sqrt, 3);
    recur(M - myPow, steps+1, substracted + myPow);
    if (sqrt - 1 >= 1){
      long myPowMinus = (long)pow(sqrt-1, 3);
      recur(myPow - 1 - myPowMinus, steps+1, substracted + myPowMinus);
    }
  }

  
}