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.PrintWriter;
import java.math.BigInteger;
import java.util.HashMap;
import java.util.Scanner;

public class Solution {
    static Scanner scanner;
    static PrintWriter writer;

    public static void main(String[] args) {
        scanner = new Scanner(System.in);
        writer = new PrintWriter(System.out);

        new Solution().run();

        scanner.close();
        writer.close();
    }

    BigInteger getGE(BigInteger a) {
        BigInteger l = BigInteger.ZERO;
        BigInteger r = a.add(BigInteger.TEN);
        while(r.subtract(l).compareTo(BigInteger.ONE) > 0) {
            BigInteger mid = l.add(r).shiftRight(1);
            if(getSum(mid).compareTo(a) > 0)
                r = mid;
            else
                l = mid;
        }
        return l;
    }

    BigInteger[] pw10;

    BigInteger f(int n, int a) {
        BigInteger res = pw10[n].multiply(BigInteger.valueOf(a * (a - 1) / 2));
        if(n > 0)
            res = res.add(pw10[n - 1].multiply(BigInteger.valueOf(45L * a * n)));
        return res;
    }

    BigInteger getSum(BigInteger v) {
        BigInteger ans = BigInteger.ZERO;

        int len = v.toString().length();
        while(v.compareTo(BigInteger.ZERO) > 0) {
            BigInteger[] divRem = v.divideAndRemainder(pw10[len - 1]);
            int b = (int)divRem[0].longValue();
            ans = ans.add(f(len - 1, b)).add(divRem[0].multiply(divRem[1]));

            v = divRem[1];
            len--;
        }
        return ans;
    }

    void run() {
        pw10 = new BigInteger[222];
        pw10[0] = BigInteger.ONE;
        for(int i = 1; i < pw10.length; i++)
            pw10[i] = pw10[i - 1].multiply(BigInteger.TEN);

        Long a = scanner.nextLong();
        BigInteger ba = BigInteger.valueOf(a);

        if(a == 1) {
            writer.println("1\n1");
            return;
        }

        HashMap<Long, BigInteger> map = new HashMap<>();

        while(true) {
            BigInteger v = getGE(ba);
            Long md = getSum(v).mod(BigInteger.valueOf(a)).longValue();

            if(map.containsKey(md)) {
                writer.println(map.get(md));
                writer.println(v.subtract(BigInteger.ONE));

                assert(getSum(v).subtract(getSum(map.get(md))).mod(BigInteger.valueOf(a)).compareTo(BigInteger.ZERO) == 0);

                return;
            }
            map.put(md, v);
            ba = ba.add(BigInteger.valueOf(a));
        }
    }
}