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.*;

public class Main {
    public static PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
    private static long aLong;

    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        long m = scanner.nextLong();
        // long cube = getNearestLowerCube(m);
        BoxInfo bi = calc(m);

        System.out.println(bi.boxCount + " " + bi.vol);

    }


    private static HashMap<Long, BoxInfo> _cache = new HashMap<>();

    private static BoxInfo calc(long m) {
        if (_cache.containsKey(m)) return _cache.get(m);
        long nearestCube = getNearestLowerCube(m);
        if (nearestCube == 1) {

            BoxInfo boxInfo = new BoxInfo();
            boxInfo.boxCount = (int)m;
            boxInfo.vol = boxInfo.boxCount;
            _cache.put(m, boxInfo);
            return boxInfo;
        }


        long count = m / nearestCube;
        long rest = m - nearestCube * count;
        BoxInfo fStr = calc(rest);
        long countFw = fStr.boxCount + 1;

        BoxInfo sStr = calc(nearestCube * count - 1);
        if (sStr.boxCount > countFw) {
            return sStr;
        }
        if (sStr.boxCount < countFw) {
            BoxInfo boxInfo = new BoxInfo();
            boxInfo.boxCount = (int)countFw;
            boxInfo.vol = nearestCube + fStr.vol;
            _cache.put(m, boxInfo);
            return boxInfo;
        }

        if (sStr.vol > nearestCube + fStr.vol) {
            return sStr;
        }
        else {
            BoxInfo boxInfo = new BoxInfo();
            boxInfo.boxCount = (int)countFw;
            boxInfo.vol = nearestCube + fStr.vol;
            _cache.put(m, boxInfo);
            return boxInfo;
        }
    }

    private static long getNearestLowerCube(long m) {
        long min = 1;
        long max = 10000;
        while (Math.abs(max - min) > 1) {
            long beetwen = (max + min) / 2;
            long betweenCube = beetwen * beetwen * beetwen;
            if (betweenCube == m) {
                return m;
            }
            else {
                if (betweenCube > m)      {
                    max = beetwen;
                }
                else if (betweenCube < m) {
                    min = beetwen;
                }
            }
        }
        return min*min*min;
    }

    public static class BoxInfo {
        long vol;
        int boxCount;

        @Override
        public int hashCode() {
            return 31 * boxCount + (int)vol;
        }

        @Override
        public boolean equals(Object obj) {
            BoxInfo outer = (BoxInfo) obj;
            return outer.vol == vol && outer.boxCount == boxCount;
        }
    }


}
