#include <bits/stdc++.h>
using namespace std;
long long a[20], mi[20], b[20], A, B, Len, NUM[10010];
map<long long, long long> mp;
inline long long num(int len, long long K) {
  if (len == 1) return (1 + b[1]) * b[1] / 2;
  return num(len - 1, K) + 1LL * mi[len - 1] * (b[len] - 1) * (b[len]) / 2 +
         b[len] * a[len - 1] + b[len] * (K % mi[len - 1] + 1);
}
inline long long findneed(long long p) {
  long long L = 1, R = (long long)1e17;
  while (L <= R) {
    long long mid = (L + R) >> 1, mid1 = mid, Len = 0;
    while (mid1 > 0) b[++Len] = mid1 % 10, mid1 /= 10;
    long long now = num(Len, mid);
    if (now == p)
      return mid;
    else if (now > p)
      R = mid - 1;
    else
      L = mid + 1;
  }
  return -1;
}
int main() {
  scanf("%lld", &A);
  B = A;
  while (A > 0) b[++Len] = A % 10, A /= 10;
  mi[0] = 1LL;
  for (int i = 1; i <= 18; ++i) mi[i] = 1LL * mi[i - 1] * 10;
  for (int i = 1; i <= 18 && a[i - 1] <= mi[18]; ++i)
    a[i] = 1LL * 45 * (i * mi[i - 1]);
  for (int i = 1; i <= 10000; ++i) {
    int p = i, len = 0;
    while (p > 0) b[++len] = p % 10, p /= 10;
    mp.insert(make_pair(NUM[i] = num(len, i * 1LL), i * 1LL));
  }
  for (int i = 0; i <= 10000; ++i) {
    for (int j = 1; j <= 3; ++j) {
      long long pd = j * B + NUM[i];
      long long dq = findneed(pd);
      if (dq > 0) return printf("%d %lld\n", i + 1, dq), 0;
    }
  }
}

### Prompt

Please create a solution in Cpp 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;
long long a[20], mi[20], b[20], A, B, Len, NUM[10010];
map<long long, long long> mp;
inline long long num(int len, long long K) {
  if (len == 1) return (1 + b[1]) * b[1] / 2;
  return num(len - 1, K) + 1LL * mi[len - 1] * (b[len] - 1) * (b[len]) / 2 +
         b[len] * a[len - 1] + b[len] * (K % mi[len - 1] + 1);
}
inline long long findneed(long long p) {
  long long L = 1, R = (long long)1e17;
  while (L <= R) {
    long long mid = (L + R) >> 1, mid1 = mid, Len = 0;
    while (mid1 > 0) b[++Len] = mid1 % 10, mid1 /= 10;
    long long now = num(Len, mid);
    if (now == p)
      return mid;
    else if (now > p)
      R = mid - 1;
    else
      L = mid + 1;
  }
  return -1;
}
int main() {
  scanf("%lld", &A);
  B = A;
  while (A > 0) b[++Len] = A % 10, A /= 10;
  mi[0] = 1LL;
  for (int i = 1; i <= 18; ++i) mi[i] = 1LL * mi[i - 1] * 10;
  for (int i = 1; i <= 18 && a[i - 1] <= mi[18]; ++i)
    a[i] = 1LL * 45 * (i * mi[i - 1]);
  for (int i = 1; i <= 10000; ++i) {
    int p = i, len = 0;
    while (p > 0) b[++len] = p % 10, p /= 10;
    mp.insert(make_pair(NUM[i] = num(len, i * 1LL), i * 1LL));
  }
  for (int i = 0; i <= 10000; ++i) {
    for (int j = 1; j <= 3; ++j) {
      long long pd = j * B + NUM[i];
      long long dq = findneed(pd);
      if (dq > 0) return printf("%d %lld\n", i + 1, dq), 0;
    }
  }
}

```