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;
clock_t start;
void Time(bool timeIt) {
  if (!timeIt) return;
  clock_t end = clock();
  double elapsed_time = ((double)end - (double)start) / (double)CLOCKS_PER_SEC;
  printf("Time elapsed = %0.4lf\n", elapsed_time);
}
long long multiply(long long a, long long b, long long mod) {
  long long ret = 0, pw = a;
  for (int i = 0; (1ll << i) <= b; ++i) {
    if (b & (1ll << i)) ret = (ret + pw) % mod;
    pw = (pw + pw) % mod;
  }
  return ret;
}
long long lg = 1, p[19];
long long calc(long long b, long long mod) {
  long long ret = multiply(p[lg - 1], lg * 45ll, mod);
  return ret;
}
bool check(long long l, long long r, long long a) {
  long long res = 0;
  for (long long i = l; i <= r; ++i) {
    long long j = i;
    while (j > 0) {
      res += j % 10;
      if (res >= a) res -= a;
      j /= 10;
    }
  }
  return (res == 0);
}
int main() {
  start = clock();
  long long a;
  cin >> a;
  long long b;
  p[0] = 1;
  for (int i = 1; i < 19; ++i) p[i] = (p[i - 1] * 10ll);
  for (int i = 1; i <= 18; ++i) {
    if (a <= p[i]) {
      b = p[i];
      lg = i;
      break;
    }
  }
  long long off = calc(b, a), l = a - off, r = b + a - off - 1;
  cout << l << " " << r << endl;
  Time(false);
  return 0;
}
