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 f(s):
    N = 0
    p = 0
    L = len(s)
    for i in xrange(len(s)):
        k = L - i - 1
        for j in xrange(int(s[i])):
            N += 9 * k * (10 ** k) / 2
            N += (p + j) * (10 ** k)
        p += int(s[i])
    return N

def g(N):
    if N == 0:
        return '0'
    s = ''
    L = 20
    for i in xrange(L):
        d = 0
        for j in xrange(10):
            if f(s + str(j) + ('0' * (L - i - 1))) >= N:
                s = s + str(j - 1)
                d = 1
                break
        if not d:
            s = s + str(9)
        #print s
    return s

A = input()
s = []
p = []
i = 1
while 1:
    m = g(i * A)
    q = f(m) % A
    d = 0
#    print m, q
    for i in xrange(len(p)):
        if q == p[i] and int(m) > int(s[i]):
            print int(s[i]), int(m) - 1
            d = 1
            break
    if d:
        break
    s.append(m)
    p.append(f(m) % A)
    i += 1
