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
#include <bits/stdc++.h>
using namespace std;
long long digitsum(long long r, long long m = 10) {
  long long ret = 0;
  for (long long x = 1; x <= r; x *= m) {
    long long dig = (r / x) % m;
    long long le = (r / x) / m;
    long long ri = r % x;
    long long cur = 0;
    for (int i = 1; i < dig; ++i) cur += i;
    ret += cur * (le + 1) * x;
    ret += dig * (le * x + ri + 1);
    cur = 0;
    for (int i = dig + 1; i < m; ++i) cur += i;
    ret += cur * le * x;
  }
  return ret;
}
long long d(long long x) {
  long long res = 0;
  while (x > 0) {
    res += x % 10;
    x /= 10;
  }
  return res;
}
long long bb(long long a) {
  long long lo = 1;
  long long hi = 100000000000000000ll;
  long long mi;
  long long fmi;
  while (hi - lo > 2) {
    mi = (hi + lo) / 2;
    fmi = digitsum(mi);
    if (a < fmi) {
      hi = mi;
    } else {
      lo = mi;
    }
  }
  return lo;
}
int main() {
  long long n;
  cin >> n;
  long long lo = 0;
  long long hi = bb(n);
  long long fhi = digitsum(hi), flo = 0;
  while (fhi - flo != n) {
    if (fhi - flo < n) {
      hi++;
      fhi += d(hi);
    } else {
      lo++;
      flo += d(lo);
    }
  }
  cout << lo + 1 << " " << hi << endl;
  return 0;
}
