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
a = int(input())

l = 1
r = 10**200

cur = [0]
cnt = [1]
for i in range(300):
	cur.append(cur[-1] * 10 + 45 * cnt[-1])
	cnt.append(cnt[-1] * 10)

def calc(x):
	global cur
	global cnt
	res = 0
	a = [int(i) for i in str(x)]
	tot = 0
	for i in range(len(a)):
		if (a[i] != 0):
			for j in range(a[i]):
				res += (tot + j) * cnt[len(a) - i - 1]
			res += a[i] * cur[len(a) - i - 1]
		tot += a[i]
	res += tot
	return res

while (l < r - 1):
	m = (l + r) // 2
	if (calc(m) < a):
		l = m
	else:
		r = m

if (calc(l) >= a):
	r = l

cur = calc(r)
l = 1

def get(x):
	res = 0
	while (x):
		res += x % 10
		x //= 10
	return res

while (cur % a != 0):
	cur -= get(l)
	l += 1
	while (cur < a):
		r += 1
		cur += get(r)

print(l, r)