Little X has met the following problem recently. 

Let's define f(x) as the sum of digits in decimal representation of number x (for example, f(1234) = 1 + 2 + 3 + 4). You are to calculate <image>

Of course Little X has solved this problem quickly, has locked it, and then has tried to hack others. He has seen the following C++ code: 
    
    
      
        ans = solve(l, r) % a;  
        if (ans <= 0)  
          ans += a;  
      
    

This code will fail only on the test with <image>. You are given number a, help Little X to find a proper test for hack.

Input

The first line contains a single integer a (1 ≤ a ≤ 1018).

Output

Print two integers: l, r (1 ≤ l ≤ r < 10200) — the required test data. Leading zeros aren't allowed. It's guaranteed that the solution exists.

Examples

Input

46


Output

1 10


Input

126444381000032


Output

2333333 2333333333333
import java.io.*;
import java.math.BigInteger;
import java.util.*;
import java.util.List;

public class Main {
    private static StringTokenizer st;
    private static BufferedReader br;
    public static long MOD = 1000000007;
    public static long tenFive = 100000;
    public static int INF = 100000;

    public static void print(Object x) {
        System.out.println(x + "");
    }
    public static void printArr(long[] x) {
        StringBuilder s = new StringBuilder();
        for (int i = 0; i < x.length; i++) {
            s.append(x[i] + " ");
        }
        print(s);
    }
    public static void printArr(int[] x) {
        StringBuilder s = new StringBuilder();
        for (int i = 0; i < x.length; i++) {
            s.append(x[i] + " ");
        }
        print(s);
    }
    public static String join(Collection<?> x, String space) {
        if (x.size() == 0) return "";
        StringBuilder sb = new StringBuilder();
        boolean first = true;
        for (Object elt : x) {
            if (first) first = false;
            else sb.append(space);
            sb.append(elt);
        }
        return sb.toString();
    }

    public static String nextToken() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            String line = br.readLine();
            st = new StringTokenizer(line.trim());
        }
        return st.nextToken();
    }
    public static int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
    public static long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
    public static List<Integer> nextInts(int N) throws IOException {
        List<Integer> ret = new ArrayList<Integer>();
        for (int i = 0; i < N; i++) {
            ret.add(nextInt());
        }
        return ret;
    }

    public static BigInteger valueFor(BigInteger x) {
        BigInteger total = BigInteger.ZERO;
        for (BigInteger place = BigInteger.ONE; place.compareTo(x) <= 0; place = place.multiply(BigInteger.TEN)) {
            BigInteger m = valueForPlace(x, place);
            //print(" " + m);
            total = total.add(m);
        }
        return total;
    }

    public static BigInteger valueForPlace(BigInteger x, BigInteger place) {
        BigInteger full = place.multiply(BigInteger.TEN);
        BigInteger fullCycles = x.divide(full);
        x = x.subtract(fullCycles.multiply(full));
        BigInteger total = fullCycles.multiply(place).multiply(new BigInteger("45"));
        BigInteger curDigit = BigInteger.ZERO;
        while (x.compareTo(place) >= 0) {
            total = total.add(place.multiply(curDigit));
            x = x.subtract(place);
            curDigit = curDigit.add(BigInteger.ONE);
        }
        total = total.add(x.add(BigInteger.ONE).multiply(curDigit));
        return total;
    }

    public static BigInteger binsearch(BigInteger l, BigInteger r, BigInteger x) {
        if (l.compareTo(r) == 0) return l;
        BigInteger mid = l.add(r).divide(new BigInteger("2"));
        BigInteger midVal = valueFor(mid);
        if (midVal.compareTo(x) > 0) {
            return binsearch(l, mid, x);
        } else if (midVal.compareTo(x) < 0) {
            return binsearch(mid.add(BigInteger.ONE), r, x);
        } else {
            return mid;
        }
    }

    public static void solve(BigInteger a) {
        Map<BigInteger, BigInteger> mods = new HashMap<BigInteger, BigInteger>();
        for (long i = 1;; i++) {
            BigInteger target = a.multiply(new BigInteger(i + ""));
            BigInteger guess = binsearch(BigInteger.ZERO, target, target);
            BigInteger guessVal = valueFor(guess).mod(a);
            //print(target + " guessed " + guess + " for " + valueFor(guess));
            if (mods.containsKey(guessVal)) {
                BigInteger other = mods.get(guessVal);
                if (other.subtract(guess).abs().compareTo(BigInteger.TEN) < 0) continue;
                print(other.add(BigInteger.ONE));
                print(guess);
                return;
            }
            mods.put(guessVal, guess);
        }
    }

    public static void main(String[] args) throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));

        //print(valueFor(new BigInteger("3")));
        //print(valueFor(new BigInteger("4")));
        BigInteger a = new BigInteger(nextToken());
        solve(a);
    }
}
