import java.util.*;
import java.io.*;

public class dices_sp implements Runnable {
    public static void main(String[] args) {
        new Thread(new dices_sp()).start();
    }

    @Override
    public void run() {
        try {
            br = new BufferedReader(new FileReader("dices.in"));
            out = new PrintWriter("dices.out");
            solve();
            out.close();
        } catch (FileNotFoundException e) {
        	e.printStackTrace();
        }
    }

    BufferedReader br;
    StringTokenizer st;
    PrintWriter out;
    boolean eof = false;

    String nextToken() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                eof = true;
                return "0";
            }
        }
        return st.nextToken();
    }

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

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

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

    void solve() {
    	long n = nextLong();
    	out.println(7 * ((n + 5) / 6) - n + " " + 6 * n);
    }
}
