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.BigInteger;
import java.util.*;
public class b {
public static void main(String[] args) throws IOException {
	input.init(System.in);
	PrintWriter out = new PrintWriter(System.out);
	long k = input.nextLong();
	//System.out.println(getSum((int)k)+" "+getSum(""+k));
	BigInteger lo = BigInteger.ZERO, hi = BigInteger.valueOf(10).pow(25);
	boolean found = false;
	BigInteger bk = BigInteger.valueOf(k);
	BigInteger last = BigInteger.ZERO;
	for(int iter = 1; !found; iter++)
	{
		BigInteger biter = BigInteger.valueOf(iter);
		//System.out.println(iter);
		if(iter > 1) hi = last.multiply(BigInteger.valueOf(2));
		while(hi.subtract(lo).compareTo(BigInteger.ONE) > 0)
		{
			BigInteger mid = lo.add(hi).divide(BigInteger.valueOf(2));
			BigInteger sum = getSum(mid.toString());
			if(sum.compareTo(bk.multiply(biter)) >= 0) hi = mid;
			else lo = mid;
		}
		//System.out.println(lo);
		last = hi;
		if(getSum(hi.toString()).mod(BigInteger.valueOf(k)).signum() == 0)
		{
			found = true;
			out.println(1+" "+hi);
		}
	}
	out.close();
}
static long getSum(int x)
{
	long res = 0;
	for(int i = 1; i<=x; i++) res += getVal(i);
	return res;
}
static int getVal(int x)
{
	int res = 0;
	while(x > 0)
	{
		res += x%10;
		x/=10;
	}
	return res;
}
static BigInteger getSum(String s)
{
	if(s.length() == 1)
	{
		int v = s.charAt(0) - '0';
		return BigInteger.valueOf(v*(v+1)/2);
	}
	String t = s.substring(1);
	char[] copy = s.toCharArray();
	for(int i = 0; i<s.length(); i++) copy[i] = '0';
	copy[1] = '1';
	BigInteger pow = new BigInteger(new String(copy));
	BigInteger bt = new BigInteger(t);
	//System.out.println(bt+" "+pow);
	BigInteger prev = pow.multiply(BigInteger.valueOf(s.length()-1)).multiply(BigInteger.valueOf(45));
	int v = s.charAt(0) - '0';
	int count = v*(v-1)/2;
	BigInteger res = getSum(t)
			.add(BigInteger.valueOf(v).multiply(bt.add(BigInteger.ONE)));
	res = res.add(prev.multiply(BigInteger.valueOf(v)));
	return res
			.add(BigInteger.valueOf(count).multiply(pow.multiply(BigInteger.TEN)));
}
public static class input {
	static BufferedReader reader;
	static StringTokenizer tokenizer;

	static void init(InputStream input) {
		reader = new BufferedReader(new InputStreamReader(input));
		tokenizer = new StringTokenizer("");
	}

	static String next() throws IOException {
		while (!tokenizer.hasMoreTokens())
			tokenizer = new StringTokenizer(reader.readLine());
		return tokenizer.nextToken();
	}

	static int nextInt() throws IOException {
		return Integer.parseInt(next());
	}

	static double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}

	static long nextLong() throws IOException {
		return Long.parseLong(next());
	}
}
}

