#include <bits/stdc++.h>
using namespace std;
int base = 10;
string s;
long long dp[22][200][2];
long long call(int pos, int sum, bool alreadySmall) {
  if (pos == (int)s.size()) return sum;
  if (dp[pos][sum][alreadySmall] != -1) return dp[pos][sum][alreadySmall];
  long long ret = 0;
  for (int i = 0; i < base; i++) {
    if (alreadySmall == false && i > s[pos] - '0') continue;
    int npos = pos + 1;
    bool nalreadySmall = alreadySmall | (i < s[pos] - '0');
    int nsum = sum + i;
    ret += call(npos, nsum, nalreadySmall);
  }
  return dp[pos][sum][alreadySmall] = ret;
}
string To_string(long long x) {
  string ret;
  while (x) {
    ret.push_back(x % base + '0');
    x /= base;
  }
  reverse(ret.begin(), ret.end());
  return ret;
}
long long sum_of_digits(long long x) {
  long long ret = 0;
  while (x) {
    ret += x % base;
    x /= base;
  }
  return ret;
}
long long f(long long n) {
  s = To_string(n);
  memset(dp, -1, sizeof dp);
  return call(0, 0, 0);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long a;
  cin >> a;
  for (int k = 1; k <= 9; k++) {
    long long lo = 0, hi = 1.2e17;
    while (hi > lo) {
      long long mid = (hi + lo) / 2;
      if (f(mid) >= k * a) {
        hi = mid;
      } else {
        lo = mid + 1;
      }
    }
    long long x = f(lo) % a;
    long long bal = lo;
    lo = 0, hi = 1.2e17;
    while (hi > lo) {
      long long mid = (hi + lo) / 2;
      if (f(mid) >= x) {
        hi = mid;
      } else {
        lo = mid + 1;
      }
    }
    if (f(lo) == x) {
      cout << lo + 1 << " " << bal << "\n";
      return 0;
    }
  }
  return 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;
int base = 10;
string s;
long long dp[22][200][2];
long long call(int pos, int sum, bool alreadySmall) {
  if (pos == (int)s.size()) return sum;
  if (dp[pos][sum][alreadySmall] != -1) return dp[pos][sum][alreadySmall];
  long long ret = 0;
  for (int i = 0; i < base; i++) {
    if (alreadySmall == false && i > s[pos] - '0') continue;
    int npos = pos + 1;
    bool nalreadySmall = alreadySmall | (i < s[pos] - '0');
    int nsum = sum + i;
    ret += call(npos, nsum, nalreadySmall);
  }
  return dp[pos][sum][alreadySmall] = ret;
}
string To_string(long long x) {
  string ret;
  while (x) {
    ret.push_back(x % base + '0');
    x /= base;
  }
  reverse(ret.begin(), ret.end());
  return ret;
}
long long sum_of_digits(long long x) {
  long long ret = 0;
  while (x) {
    ret += x % base;
    x /= base;
  }
  return ret;
}
long long f(long long n) {
  s = To_string(n);
  memset(dp, -1, sizeof dp);
  return call(0, 0, 0);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long a;
  cin >> a;
  for (int k = 1; k <= 9; k++) {
    long long lo = 0, hi = 1.2e17;
    while (hi > lo) {
      long long mid = (hi + lo) / 2;
      if (f(mid) >= k * a) {
        hi = mid;
      } else {
        lo = mid + 1;
      }
    }
    long long x = f(lo) % a;
    long long bal = lo;
    lo = 0, hi = 1.2e17;
    while (hi > lo) {
      long long mid = (hi + lo) / 2;
      if (f(mid) >= x) {
        hi = mid;
      } else {
        lo = mid + 1;
      }
    }
    if (f(lo) == x) {
      cout << lo + 1 << " " << bal << "\n";
      return 0;
    }
  }
  return 0;
}

```