#include <bits/stdc++.h>
using namespace std;
int bit[25];
pair<long long, long long> dp[25];
bool vis[25];
pair<long long, long long> dfs(int pos, int lim) {
  if (!pos) return make_pair(0, 1);
  if (!lim && vis[pos]) return dp[pos];
  int num = lim ? bit[pos] : 9;
  pair<long long, long long> ret = make_pair(0, 0);
  for (int i = 0; i <= num; ++i) {
    pair<long long, long long> t = dfs(pos - 1, lim && i == num);
    ret.second += t.second;
    ret.first += t.first + t.second * i;
  }
  if (!lim) {
    vis[pos] = 1;
    dp[pos] = ret;
  }
  return ret;
}
long long shuwei(long long n) {
  memset(bit, 0, sizeof(bit));
  int cnt = 0;
  while (n) {
    bit[++cnt] = n % 10;
    n /= 10;
  }
  return dfs(cnt, 1).first;
}
long long Getdig(long long a) {
  long long sum = 0;
  while (a) {
    sum += a % 10;
    a /= 10;
  }
  return sum;
}
void solve(long long a) {
  long long L = 1, R = 1e17;
  while (L < R) {
    long long m = (L + R) >> 1;
    if (shuwei(m) < a)
      L = m + 1;
    else
      R = m;
  }
  L = 0;
  long long S = shuwei(R);
  while (1) {
    if (S > a)
      S -= Getdig(++L);
    else if (S < a)
      S += Getdig(++R);
    else
      break;
  }
  printf("%lld %lld\n", L + 1, R);
}
int main(int argc, char const *argv[]) {
  long long a;
  memset(vis, 0, sizeof(vis));
  while (scanf("%lld", &a) != -1) solve(a);
  return 0;
}

### 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;
int bit[25];
pair<long long, long long> dp[25];
bool vis[25];
pair<long long, long long> dfs(int pos, int lim) {
  if (!pos) return make_pair(0, 1);
  if (!lim && vis[pos]) return dp[pos];
  int num = lim ? bit[pos] : 9;
  pair<long long, long long> ret = make_pair(0, 0);
  for (int i = 0; i <= num; ++i) {
    pair<long long, long long> t = dfs(pos - 1, lim && i == num);
    ret.second += t.second;
    ret.first += t.first + t.second * i;
  }
  if (!lim) {
    vis[pos] = 1;
    dp[pos] = ret;
  }
  return ret;
}
long long shuwei(long long n) {
  memset(bit, 0, sizeof(bit));
  int cnt = 0;
  while (n) {
    bit[++cnt] = n % 10;
    n /= 10;
  }
  return dfs(cnt, 1).first;
}
long long Getdig(long long a) {
  long long sum = 0;
  while (a) {
    sum += a % 10;
    a /= 10;
  }
  return sum;
}
void solve(long long a) {
  long long L = 1, R = 1e17;
  while (L < R) {
    long long m = (L + R) >> 1;
    if (shuwei(m) < a)
      L = m + 1;
    else
      R = m;
  }
  L = 0;
  long long S = shuwei(R);
  while (1) {
    if (S > a)
      S -= Getdig(++L);
    else if (S < a)
      S += Getdig(++R);
    else
      break;
  }
  printf("%lld %lld\n", L + 1, R);
}
int main(int argc, char const *argv[]) {
  long long a;
  memset(vis, 0, sizeof(vis));
  while (scanf("%lld", &a) != -1) solve(a);
  return 0;
}

```