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 main():
    a = int(raw_input())
    t = 0
    dp = [0, 45]
    d = [1, 10]
    for i in xrange(1, 21):
        dp.append((dp[-1] * 10 + 45 * d[-1]))
        d.append(d[-1] * 10)
    def f(x):
        res = 0
        i = 0
        t = 1
        while x:
            y = x % 10
            res += dp[i] * y 
            res += y * (y - 1) / 2 * d[i] 
            res += t * y
            t = y * d[i] + t
            x /= 10
            i = i + 1
        return res
    l, r = 10, 10 ** 18
    while 1:
        mid = (l + r) / 2
        k = f(mid) - f(10)
        if abs(k - a) < 1000:
            break
        if k > a:
            r = mid
        else:
            l = mid
    r = mid
    l = 10
    while 1:
        if k > a:
            l = l + 1
        elif k == a:
            print l + 1, r
            return
        else:
            r = r + 1
        k = f(r) - f(l)
main()
