#include <bits/stdc++.h>
using namespace std;
unsigned long long l, r, a, ansl, ansr, sum;
unsigned long long count(unsigned long long n, unsigned long long x) {
  unsigned long long ans = 0, p = 1;
  while (n / p != 0) {
    unsigned long long A = n / (p * 10);
    unsigned long long B = (n / p) % 10;
    unsigned long long C = n - (n / p) * p;
    if (B < x) ans += A * p;
    if (B == x) ans += A * p + C + 1;
    if (B > x) ans += (A + 1) * p;
    p *= 10;
  }
  return ans;
}
unsigned long long get(unsigned long long x) {
  if (x < 10) return x;
  return (x % 10 + get(x / 10));
}
int main() {
  scanf("%I64d", &a);
  unsigned long long l = 1;
  r = a / 10;
  while (l <= r) {
    unsigned long long mid = (l + r) >> 1, w = 0;
    for (unsigned long long j = 1; j <= 9; j++) w += count(mid, j) * j;
    if (w >= a && w <= a + 200) {
      ansr = mid;
      sum = w;
      break;
    }
    if (w > a)
      r = mid - 1;
    else
      l = mid + 1;
  }
  while (sum > a) sum -= get(ansr--);
  ansl = 1;
  while (sum != a) {
    while (sum > a) sum -= get(ansl++);
    while (sum < a) sum += get(++ansr);
  }
  printf("%I64d %I64d", ansl, ansr);
  return 0;
}

### Prompt

Generate a Cpp solution to 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;
unsigned long long l, r, a, ansl, ansr, sum;
unsigned long long count(unsigned long long n, unsigned long long x) {
  unsigned long long ans = 0, p = 1;
  while (n / p != 0) {
    unsigned long long A = n / (p * 10);
    unsigned long long B = (n / p) % 10;
    unsigned long long C = n - (n / p) * p;
    if (B < x) ans += A * p;
    if (B == x) ans += A * p + C + 1;
    if (B > x) ans += (A + 1) * p;
    p *= 10;
  }
  return ans;
}
unsigned long long get(unsigned long long x) {
  if (x < 10) return x;
  return (x % 10 + get(x / 10));
}
int main() {
  scanf("%I64d", &a);
  unsigned long long l = 1;
  r = a / 10;
  while (l <= r) {
    unsigned long long mid = (l + r) >> 1, w = 0;
    for (unsigned long long j = 1; j <= 9; j++) w += count(mid, j) * j;
    if (w >= a && w <= a + 200) {
      ansr = mid;
      sum = w;
      break;
    }
    if (w > a)
      r = mid - 1;
    else
      l = mid + 1;
  }
  while (sum > a) sum -= get(ansr--);
  ansl = 1;
  while (sum != a) {
    while (sum > a) sum -= get(ansl++);
    while (sum < a) sum += get(++ansr);
  }
  printf("%I64d %I64d", ansl, ansr);
  return 0;
}

```