#include <bits/stdc++.h>
using namespace std;
long long int tra(long long int n) {
  long long int res = 0;
  while (n > 0) {
    res += (n % 10);
    n /= 10;
  }
  return res;
}
long long int func(long long int n) {
  long long int res = 0, sum = 0, len = 0, x = n;
  while (x > 0) {
    x /= 10;
    len++;
  }
  long long int temp = n, d = 1;
  while (d <= n) d *= 10;
  d /= 10;
  while (d >= 1) {
    x = (n / d);
    res += ((x * (x - 1) / 2) + sum * x) * pow(10, len - 1);
    if (len >= 2) res += 45 * (len - 1) * x * pow(10, len - 2);
    sum += x;
    len--;
    n -= x * d;
    d /= 10;
  }
  res += tra(temp);
  return res;
}
void solve() {
  long long int n;
  cin >> n;
  long long int l = 0, r = 1;
  while (func(r) <= n) r *= 2;
  long long int l0 = 1, r0 = r;
  while (l0 <= r0) {
    long long int m0 = (l0 + r0) / 2;
    if (func(m0) < n)
      l0 = m0 + 1;
    else {
      r = m0;
      r0 = m0 - 1;
    }
  }
  long long int sl = 0, sr = func(r) % n;
  while (sl != sr) {
    if (l + 1 == r || sl > sr) {
      r++;
      sr += tra(r) % n;
      sr %= n;
    } else {
      l++;
      sl += tra(l) % n;
      sl %= n;
    }
  }
  cout << l + 1 << " " << r;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int qc = 1;
  for (long long int i = 1; i <= qc; i++) solve();
}

### Prompt

Your task is to create 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;
long long int tra(long long int n) {
  long long int res = 0;
  while (n > 0) {
    res += (n % 10);
    n /= 10;
  }
  return res;
}
long long int func(long long int n) {
  long long int res = 0, sum = 0, len = 0, x = n;
  while (x > 0) {
    x /= 10;
    len++;
  }
  long long int temp = n, d = 1;
  while (d <= n) d *= 10;
  d /= 10;
  while (d >= 1) {
    x = (n / d);
    res += ((x * (x - 1) / 2) + sum * x) * pow(10, len - 1);
    if (len >= 2) res += 45 * (len - 1) * x * pow(10, len - 2);
    sum += x;
    len--;
    n -= x * d;
    d /= 10;
  }
  res += tra(temp);
  return res;
}
void solve() {
  long long int n;
  cin >> n;
  long long int l = 0, r = 1;
  while (func(r) <= n) r *= 2;
  long long int l0 = 1, r0 = r;
  while (l0 <= r0) {
    long long int m0 = (l0 + r0) / 2;
    if (func(m0) < n)
      l0 = m0 + 1;
    else {
      r = m0;
      r0 = m0 - 1;
    }
  }
  long long int sl = 0, sr = func(r) % n;
  while (sl != sr) {
    if (l + 1 == r || sl > sr) {
      r++;
      sr += tra(r) % n;
      sr %= n;
    } else {
      l++;
      sl += tra(l) % n;
      sl %= n;
    }
  }
  cout << l + 1 << " " << r;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int qc = 1;
  for (long long int i = 1; i <= qc; i++) solve();
}

```