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
def dig(n):
	return sum(map(int, list(str(n))))

def dig_sum(n): # sum of digit sum from 1 to n
	l = len(str(n))
	res = 0
	for i in range(l)[::-1]:
		a = n / 10 ** i
		if i: res += a * 45 * 10 ** (i - 1) * i
		n -= a * 10 ** i
		res += a * (a - 1) / 2 * 10 ** i
		res += (n + 1) * a
	return res

def binary(val):
	l, r = 0, val + 1
	while r - l > 1:
		mid = (l + r) / 2
		if dig_sum(mid) < val:
			l = mid
		else :
			r = mid
	return l

magic = 1000
ans = [-1] * magic
ans[0] = 0

a = int(raw_input())
x = 1

while True:
	val = dig_sum(x)
	if val % a >= magic:
		nval = val + (a - val % a)
		x = binary(nval) + 1
		continue
	val %= a
	if ans[val] != -1:
		print ans[val] + 1, x
		break
	else :
		ans[val] = x
	x += 1
