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

public class c{
	static BigInteger f(long n){
		BigInteger d1 = new BigInteger("0");
		BigInteger d2 = new BigInteger("0");
		BigInteger m = BigInteger.valueOf(n);
		BigInteger d = BigInteger.valueOf(1);
		for(int k = 1; k < 20; ++k){
			m = m.divide(BigInteger.valueOf(10));
			d = d.multiply(BigInteger.valueOf(10));
			d1 = d1.add(m);
			d2 = d2.add((m.add(BigInteger.valueOf(1))).multiply(m).multiply(d));
		}
		BigInteger ans = ((BigInteger.valueOf(n).add(BigInteger.valueOf(1))).multiply(BigInteger.valueOf(n).subtract(d1.multiply(BigInteger.valueOf(18)))).add(d2.multiply(BigInteger.valueOf(9)))).divide(BigInteger.valueOf(2));
		return ans;
//		ll ans = ((n+1)*(n-18*d1)+d2*9)/2;
//		return ans;
//		return new BigInteger("1");
	}
    public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		BigInteger a = scanner.nextBigInteger();
		long visited[] = new long[200];
		for(int i = 0; i < 200; ++i)
			visited[i] = -1;
		visited[0] = 0;
		for(int i = 1; i < 200; ++i){
			BigInteger goal = a.multiply(BigInteger.valueOf(i));
			long lo = 0, hi = (long)2e18, mid;
			while(lo<hi){
				mid = (lo+hi)/2;
				BigInteger comp = f(mid);
				if(comp.compareTo(goal)>=0)
					hi = mid;
				else
					lo = mid+1;
			}
//			System.out.println(lo);
			int diff = f(lo).subtract(goal).intValue();
//			System.out.println(diff);
			if(visited[diff]!=-1){
				System.out.println(visited[diff]+1+" "+lo);
				return;
			}
			visited[diff] = lo;
		}
    }

}
