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;
const int inf = 0x3f3f3f3f;
const long long INF = 1ll << 60;
const double PI = acos(-1.0);
int n, m;
long long pw[19];
long long sum[20];
long long calc(long long x) {
  if (x == 0) return 0;
  return 45ll * x * pw[x - 1];
}
long long find(long long k) {
  long long x, y;
  int num[20];
  int m = 0;
  while (k) {
    num[m] = k % 10;
    m++;
    k /= 10;
  }
  long long res = 0;
  long long cnt = 0;
  for (int i = 0; i < m; i++) {
    if (num[i]) {
      res += calc(i) * num[i];
      res += sum[num[i] - 1] * pw[i];
      res += num[i] * (cnt + 1);
    }
    cnt += num[i] * pw[i];
  }
  return res;
}
int main() {
  pw[0] = 1;
  pw[1] = 10;
  sum[0] = 0;
  sum[1] = 1;
  for (int i = 2; i <= 19; i++) pw[i] = pw[i - 1] * 10, sum[i] = sum[i - 1] + i;
  long long x, y;
  long long a;
  while (~scanf("%I64d", &a)) {
    long long l = 0, r = 100000000000000000LL;
    long long ansl, ansr;
    long long mid;
    while (l < r) {
      mid = (l + r) >> 1;
      if (find(mid) >= a)
        r = mid;
      else
        l = mid + 1;
    }
    ansl = 1;
    ansr = l;
    x = find(ansl - 1);
    y = find(ansr);
    while (y - x != a) {
      if (y - x > a)
        ansl++;
      else
        ansr++;
      x = find(ansl - 1);
      y = find(ansr);
    }
    printf("%I64d %I64d\n", ansl, ansr);
  }
  return 0;
}
