#include <bits/stdc++.h>
using namespace std;
int up[20][2];
pair<long long, long long> dp[20][2][2];
long long MAX = 1e18 + 1;
bool bb = 0;
pair<long long, long long> f(int i, bool b, bool b1) {
  if (i == 20) {
    return make_pair(1, 0);
  }
  if (dp[i][b][b1].first != -1) return dp[i][b][b1];
  int mn = up[i][0];
  if (b) mn = 0;
  int mx = up[i][1];
  if (b1) mx = 9;
  long long r = 0;
  long long r1 = 0;
  for (int j = mn; j <= mx; j++) {
    if (f(i + 1, b || (j > up[i][0]), b1 || (j < up[i][1])).first >
        (1e18 - f(i + 1, b || (j > up[i][0]), b1 || (j < up[i][1])).second -
         r) /
            j) {
      bb = 1;
      return dp[i][b][b1] = make_pair(0, 1e18 + 1);
    }
    r += f(i + 1, b || (j > up[i][0]), b1 || (j < up[i][1])).first * j +
         f(i + 1, b || (j > up[i][0]), b1 || (j < up[i][1])).second;
    r1 += f(i + 1, b || (j > up[i][0]), b1 || (j < up[i][1])).first;
  }
  return dp[i][b][b1] = make_pair(r1, r);
}
void f1(int i, bool b, bool b1) {
  if (i == 20) {
    return;
  }
  if (dp[i][b][b1].first == -1) return;
  int mn = up[i][0];
  if (b) mn = 0;
  int mx = up[i][1];
  if (b1) mx = 9;
  long long r = 0;
  long long r1 = 0;
  for (int j = mn; j <= mx; j++) {
    f1(i + 1, b || (j > up[i][0]), b1 || (j < up[i][1]));
  }
  dp[i][b][b1] = make_pair(-1, -1);
}
void con(long long x, int i) {
  int j = 19;
  while (j >= 0) {
    up[j--][i] = x % 10;
    x /= 10;
  }
}
int main() {
  long long n;
  cin >> n;
  for (int i = 0; i < 20; i++) {
    dp[i][0][0] = make_pair(-1, -1);
    dp[i][0][1] = make_pair(-1, -1);
    dp[i][1][1] = make_pair(-1, -1);
    dp[i][1][0] = make_pair(-1, -1);
  }
  for (int j = 1; j <= 1e6; j++) {
    con(j, 0);
    long long l = j, h = 1e17;
    long long r = -1;
    while (l <= h) {
      long long m = (l + h) / 2;
      con(m, 1);
      bb = 0;
      long long res = f(0, 0, 0).second;
      f1(0, 0, 0);
      if (!bb && res < n)
        l = m + 1;
      else if (bb || res > n)
        h = m - 1;
      else {
        r = m;
        break;
      }
    }
    if (r != -1) {
      cout << j << " " << r << endl;
      return 0;
    }
  }
  return 0;
}

### Prompt

In CPP, your task is to solve the following problem:

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

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
int up[20][2];
pair<long long, long long> dp[20][2][2];
long long MAX = 1e18 + 1;
bool bb = 0;
pair<long long, long long> f(int i, bool b, bool b1) {
  if (i == 20) {
    return make_pair(1, 0);
  }
  if (dp[i][b][b1].first != -1) return dp[i][b][b1];
  int mn = up[i][0];
  if (b) mn = 0;
  int mx = up[i][1];
  if (b1) mx = 9;
  long long r = 0;
  long long r1 = 0;
  for (int j = mn; j <= mx; j++) {
    if (f(i + 1, b || (j > up[i][0]), b1 || (j < up[i][1])).first >
        (1e18 - f(i + 1, b || (j > up[i][0]), b1 || (j < up[i][1])).second -
         r) /
            j) {
      bb = 1;
      return dp[i][b][b1] = make_pair(0, 1e18 + 1);
    }
    r += f(i + 1, b || (j > up[i][0]), b1 || (j < up[i][1])).first * j +
         f(i + 1, b || (j > up[i][0]), b1 || (j < up[i][1])).second;
    r1 += f(i + 1, b || (j > up[i][0]), b1 || (j < up[i][1])).first;
  }
  return dp[i][b][b1] = make_pair(r1, r);
}
void f1(int i, bool b, bool b1) {
  if (i == 20) {
    return;
  }
  if (dp[i][b][b1].first == -1) return;
  int mn = up[i][0];
  if (b) mn = 0;
  int mx = up[i][1];
  if (b1) mx = 9;
  long long r = 0;
  long long r1 = 0;
  for (int j = mn; j <= mx; j++) {
    f1(i + 1, b || (j > up[i][0]), b1 || (j < up[i][1]));
  }
  dp[i][b][b1] = make_pair(-1, -1);
}
void con(long long x, int i) {
  int j = 19;
  while (j >= 0) {
    up[j--][i] = x % 10;
    x /= 10;
  }
}
int main() {
  long long n;
  cin >> n;
  for (int i = 0; i < 20; i++) {
    dp[i][0][0] = make_pair(-1, -1);
    dp[i][0][1] = make_pair(-1, -1);
    dp[i][1][1] = make_pair(-1, -1);
    dp[i][1][0] = make_pair(-1, -1);
  }
  for (int j = 1; j <= 1e6; j++) {
    con(j, 0);
    long long l = j, h = 1e17;
    long long r = -1;
    while (l <= h) {
      long long m = (l + h) / 2;
      con(m, 1);
      bb = 0;
      long long res = f(0, 0, 0).second;
      f1(0, 0, 0);
      if (!bb && res < n)
        l = m + 1;
      else if (bb || res > n)
        h = m - 1;
      else {
        r = m;
        break;
      }
    }
    if (r != -1) {
      cout << j << " " << r << endl;
      return 0;
    }
  }
  return 0;
}

```