#include <bits/stdc++.h>
long long f(long long n, long long q) {
  long long i, j, r = 0;
  for (i = j = 1; i <= n; i *= 10) {
    r += (n / i / 10 - !q) * i;
    if (n / i % 10 == q) r += n % i + 1;
    if (n / i % 10 > q) r += i;
  }
  return r;
}
long long g(long long n) {
  long long i, r = 0;
  if (n == 0) return 0;
  for (i = 1; i < 10; i++) r += i * f(n, i);
  return r;
}
int main() {
  long long a = 0;
  long long i, j, t, n;
  scanf("%I64d", &n);
  i = 1;
  j = 2e16;
  while (i < j) {
    t = (i + j) >> 1;
    if (g(t) < n)
      i = t + 1;
    else
      j = t;
  }
  i = 1;
  while ((t = g(j) - g(i - 1)) != n) {
    if (t < n)
      j++;
    else
      i++;
  }
  printf("%I64d %I64d", i, j);
}

### Prompt

Develop a solution in CPP to the problem described below:

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>
long long f(long long n, long long q) {
  long long i, j, r = 0;
  for (i = j = 1; i <= n; i *= 10) {
    r += (n / i / 10 - !q) * i;
    if (n / i % 10 == q) r += n % i + 1;
    if (n / i % 10 > q) r += i;
  }
  return r;
}
long long g(long long n) {
  long long i, r = 0;
  if (n == 0) return 0;
  for (i = 1; i < 10; i++) r += i * f(n, i);
  return r;
}
int main() {
  long long a = 0;
  long long i, j, t, n;
  scanf("%I64d", &n);
  i = 1;
  j = 2e16;
  while (i < j) {
    t = (i + j) >> 1;
    if (g(t) < n)
      i = t + 1;
    else
      j = t;
  }
  i = 1;
  while ((t = g(j) - g(i - 1)) != n) {
    if (t < n)
      j++;
    else
      i++;
  }
  printf("%I64d %I64d", i, j);
}

```