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 random
import sys

def f(n, mod):
	l=[]
	while n>0:
		l.append(n%10)
		n//=10
	ret=0
	num=0
	suma=0
	war=1
	for i in l:
		a=0
		b=0
		
		for j in range(i):
			a=(a+suma+j*war)%mod
		a=(a+ret+i*(num+1))%mod
		
		for j in range(10):
			b=(b+suma+j*war)%mod
		
		ret=a
		suma=b
		
		num=(num+war*i)%mod
		war=(war*10)%mod
	return ret

def los(dlu):
	ret=0
	for i in range(dlu):
		ret=ret*10+random.randint(0, 9)
	return ret

def ans(a, b):
	print(a, b)
	sys.exit(0)

pam=[(0, 0)]

mod=int(input())

while True:
	a=los(42)
	b=a+los(20)
	if a==b:
		continue
	if a>b:
		a,b=b,a
	wa=f(a, mod)
	wb=f(b, mod)
	if wa==wb:
		ans(a+1, b)
	if wa<wb:
		continue
	#~ print("jade")
	while a+1<b:
		s=(a+b)//2
		ws=f(s, mod)
		#~ if ws==0:
			#~ ans(1, s)
		if ws<=wb:
			b=s
			wb=ws
		else:
			a=s
			wa=ws
	for i in pam:
		if i[1]==wb:
			ans(min(i[0], b)+1, max(i[0], b))
	pam.append((b, wb))
