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.*;
import java.util.*;

public class c {
    public static void main(String args[]) throws IOException {        
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);
        BigInteger a = new BigInteger(in.readLine());
        HashMap<Long,BigInteger> map = new HashMap<Long,BigInteger>();
        map.put(1L,BigInteger.ONE);
        BigInteger cur = a;
        while(true) {
            long rem;
            BigInteger l = new BigInteger("1"), r = BigInteger.TEN.pow(40);
            while(l.compareTo(r) < 0) {
                BigInteger mid = (l.add(r).divide(new BigInteger("2")));
                if(go(mid).compareTo(cur) >= 0) r = mid;
                else l = mid.add(BigInteger.ONE);
            }
            rem = go(l).subtract(cur).longValue();
            if(rem == 0) {
                out.println("1 "+l.toString());
                break;
            }                
            if(map.containsKey(rem)) {
                out.println(map.get(rem).add(BigInteger.ONE).toString() + " " + l.toString());
                break;
            }
            map.put(rem,l);
            cur = cur.add(a);
        }
        out.close();
    }
    public static BigInteger go(BigInteger n) {
        BigInteger tail = BigInteger.ZERO;
        BigInteger curpow = BigInteger.ONE;
        BigInteger ret = BigInteger.ZERO;
        BigInteger free = BigInteger.ZERO;
        while(n.compareTo(BigInteger.ZERO) > 0) {
            BigInteger lastDig = n.mod(BigInteger.TEN);
            for(BigInteger x = BigInteger.ZERO; x.compareTo(lastDig) < 0; x = x.add(BigInteger.ONE))
                ret = ret.add(x.multiply(curpow)).add(free);
            free = free.multiply(BigInteger.TEN);
            for(BigInteger x = BigInteger.ZERO; x.compareTo(BigInteger.TEN) < 0; x = x.add(BigInteger.ONE)) 
                free = free.add(x.multiply(curpow));
            ret = ret.add(lastDig.multiply(tail.add(BigInteger.ONE)));
            tail = tail.add(lastDig.multiply(curpow));
            curpow = curpow.multiply(BigInteger.TEN);
            n = n.divide(BigInteger.TEN);
        }
        return ret;
    }    
};
            
            
