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


public class Main {
	public static BigInteger a;
	public static BigInteger two = new BigInteger("2");
	public static BigInteger fff = new BigInteger("45");
	public static BigInteger Dig(BigInteger x){
		BigInteger res=new BigInteger("0");
		while(x.compareTo(BigInteger.ZERO)>0){
			res = res.add(x.mod(BigInteger.TEN));
			x = x.divide(BigInteger.TEN);
		}
		return res.mod(a);
	}
	public static BigInteger getS(BigInteger x){
		if(x.compareTo(BigInteger.TEN)<0){
			BigInteger A = x.add(BigInteger.ONE).multiply(x);
			A = A.divide(two);
			return A.mod(a);
		}else{
			BigInteger ans=BigInteger.ZERO;
			while((x.mod(BigInteger.TEN).compareTo(BigInteger.ZERO)!=0)){
				ans = ans.add(Dig(x));
				x = x.subtract(BigInteger.ONE);
			}
			ans = ans.add(Dig(x));
			ans = ans.add(x.divide(BigInteger.TEN).multiply(fff));
			BigInteger cur = x.divide(BigInteger.TEN);
			cur = cur.subtract(BigInteger.ONE);
			cur = getS(cur).multiply(BigInteger.TEN);
			ans = ans.add(cur);
			return ans.mod(a);
		}
	}
    public static void main(String[] args) {
    	Scanner cin = new Scanner(System.in);
    	a = cin.nextBigInteger();
		BigInteger n = new BigInteger("10000000000000000000");
		BigInteger P = getS(n);
		BigInteger cc = a.subtract(P);
		BigInteger l = BigInteger.ONE.add(cc);
		BigInteger r = n.add(cc);
		//System.out.println(getS(r).subtract(getS(l.subtract(BigInteger.ONE))));
		System.out.println(l+" "+r);
		cin.close();
    }
}