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;
unsigned long long a[20];
int n;
unsigned long long d[20];
unsigned long long sum[10];
unsigned long long d2[20];
unsigned long long x1[20];
unsigned long long x2[20];
int main() {
  cin.tie(0);
  cin.sync_with_stdio(0);
  sum[0] = 0;
  for (int i = 1; i <= 9; i++) sum[i] = sum[i - 1] + i;
  d[0] = 1;
  for (int i = 1; i <= 17; i++) {
    d[i] = d[i - 1] * 10;
    if (i < 18) d2[i] = d[i] * 9 * i / 2;
  }
  unsigned long long need;
  cin >> need;
  for (int i = 1; i <= 17; i++) {
    x1[i] = 0;
    x2[i] = 0;
  }
  unsigned long long r1 = 0;
  unsigned long long r2 = 0;
  unsigned long long b;
  for (int dig = 17; dig >= 1; dig--) {
    n = 17;
    unsigned long long best = 9000000000000000000;
    int best1 = 0;
    int best2 = 0;
    for (int dig1 = 0; dig1 <= 9; dig1++)
      for (int dig2 = 0; dig2 <= 9; dig2++) {
        x1[dig] = dig1;
        x2[dig] = dig2;
        for (int i = 1; i <= 17; i++) a[i] = x1[i];
        int sm = 0;
        unsigned long long res1 = 0;
        for (int i = n; i >= 1; i--) {
          res1 += a[i];
          res1 += a[i] * d2[i - 1] + sum[a[i] - 1] * d[i - 1] +
                  sm * d[i - 1] * a[i];
          sm += a[i];
        }
        for (int i = 1; i <= 17; i++) a[i] = x2[i];
        sm = 0;
        unsigned long long res2 = 0;
        for (int i = n; i >= 1; i--) {
          res2 += a[i];
          res2 += a[i] * d2[i - 1] + sum[a[i] - 1] * d[i - 1] +
                  sm * d[i - 1] * a[i];
          sm += a[i];
        }
        if (res2 >= res1) {
          unsigned long long huyak;
          if (res2 - res1 > need)
            huyak = res2 - res1 - need;
          else
            huyak = need + res1 - res2;
          if (huyak < best) {
            best1 = dig1;
            best2 = dig2;
            best = huyak;
            r1 = res1;
            r2 = res2;
          }
        }
      }
    x1[dig] = best1;
    x2[dig] = best2;
    b = best;
  }
  unsigned long long res1 = r1;
  unsigned long long res2 = r2;
  int cnt = 0;
  if (r2 - r1 != need)
    while (true) {
      cnt++;
      int x = 1;
      while (x1[x] == 9) {
        x1[x] = 0;
        x++;
      }
      x1[x] = (x1[x] + 1) % 10;
      for (int i = 1; i <= 17; i++) res1 += x1[i];
      while (res1 + need > res2) {
        int x = 1;
        while (x2[x] == 9) {
          x2[x] = 0;
          x++;
        }
        x2[x] = (x2[x] + 1) % 10;
        for (int i = 1; i <= 17; i++) res2 += x2[i];
      }
      if (res1 + need == res2) break;
    }
  int x = 1;
  while (x1[x] == 9) {
    x1[x] = 0;
    x++;
  }
  x1[x] = (x1[x] + 1) % 10;
  bool z = false;
  for (int i = 17; i >= 1; i--) {
    if (x1[i] > 0) z = true;
    if (z) cout << x1[i];
  }
  cout << "\n";
  z = false;
  for (int i = 17; i >= 1; i--) {
    if (x2[i] > 0) z = true;
    if (z) cout << x2[i];
  }
  return 0;
}
