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.*;

public class C {
	static BigInteger inf = BigInteger.TEN.pow(25);
	
	static BigInteger digits(BigInteger N)
	{
		N = N.add(BigInteger.ONE);
		String S = N.toString();
		int len = S.length();
		BigInteger[] power = new BigInteger[len];
		power[len - 1] = BigInteger.ONE;
		for(int i = len - 2; i >= 0; i--)
		{
			power[i] = power[i + 1].multiply(BigInteger.TEN);
		}
		
		BigInteger total = BigInteger.ZERO;
		long pref = 0;
		for(int i = 0; i < S.length(); i++)
		{
			long d = (long)(S.charAt(i)) - (long)('0');
			//System.out.println("d = " + d);
			BigInteger add = power[i].multiply(BigInteger.valueOf(d * (2 * pref + (d - 1) + 9 * (len - 1 - i)))).divide(BigInteger.valueOf(2L));
			//System.out.println("add = " + add.toString());
			total = total.add(add);
			pref += d;
		}
		
		return total;
	}
	
	static BigInteger seg(BigInteger l, BigInteger r)
	{
		return digits(r).subtract(digits(l.subtract(BigInteger.ONE)));
	}
	
	static BigInteger next(BigInteger s, BigInteger mod)
	{
		BigInteger low = s, high = s.add(inf);
		while(!(low.add(BigInteger.ONE).equals(high)))
		{
			BigInteger mid = low.add(high).divide(BigInteger.valueOf(2));
			if(seg(s, mid).compareTo(mod) < 0) low = mid;
			else high = mid;
		}
		return high;
	}
	
	static int digits_bf(int l, int r)
	{
		int total = 0;
		for(int i = l; i <= r; i++)
		{
			for(int j = i; j > 0; j /= 10) total += j % 10;
		}
		return total;
	}
	
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		BigInteger mod = BigInteger.valueOf(sc.nextLong());
		sc.close();
		//System.out.println(digits(BigInteger.valueOf(sc.nextLong())));
		//System.out.println(digits(next(BigInteger.ZERO)).subtract(mod));
		BigInteger[] num = new BigInteger[200];
		int[] rem = new int[200];
		for(int i = 0; i < 200; i++)
		{
			num[i] = next(BigInteger.ZERO, mod.multiply(BigInteger.valueOf(i * 100)));
			rem[i] = seg(BigInteger.ZERO, num[i]).mod(mod).intValue();
			//System.out.println(i + " : num = " + num[i] + ", rem = " + rem[i]);
		}
		for(int i = 0; i < 200; i++)
			for(int j = i + 1; j < 200; j++)
			{
				if(rem[i] == rem[j])
				{
					System.out.println(num[i].add(BigInteger.ONE) + " " + num[j]);
					//System.out.println("val = " + digits_bf(2, 5058));
					System.exit(0);
				}
			}
	}
}
