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
#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
long long pw[19], F[19][10], n;
vector<long long> vc;
inline long long calc(long long x) {
  vc.clear();
  while (x) vc.push_back(x % 10), x /= 10;
  long long ret = 0, s = 0;
  for (long long i = vc.size() - 1; i >= 0; s += vc[i], i--)
    ret += (vc[i] > 0 ? F[i][vc[i] - 1] : 0) + vc[i] * pw[i] * s + vc[i];
  return ret;
}
inline long long slar(long long x) {
  long long ret = 0;
  while (x) ret += x % 10, x /= 10;
  return ret;
}
signed main() {
  pw[0] = 1;
  for (long long i = 1; i <= 17; i++) pw[i] = pw[i - 1] * 10;
  for (long long i = 1; i <= 9; i++) F[0][i] = F[0][i - 1] + i;
  for (long long i = 1; i <= 16; i++) {
    F[i][0] = F[i - 1][9];
    for (long long j = 1; j <= 9; j++)
      F[i][j] = F[i][j - 1] + pw[i] * j + F[i][0];
  }
  cin >> n;
  long long l = 1, r = pw[17] - 1, Ans;
  while (l <= r) {
    long long mid = (l + r) >> 1;
    if (calc(mid) >= n)
      Ans = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  l = 1;
  r = Ans;
  long long sum = calc(Ans);
  while (1) {
    if (sum == n) {
      cout << l << " " << r << endl;
      return 0;
    }
    sum -= slar(l);
    l++;
    while (sum < n) sum += slar(++r);
  }
  return 0;
}
