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;
template <typename T>
inline T abs(T t) {
  return t < 0 ? -t : t;
}
const unsigned long long modn = 1000000007;
inline unsigned long long mod(unsigned long long x) { return x % modn; }
int n;
int num[25];
long long memo[30][2][300];
long long solve(int i, int pre, int sum) {
  if (i == n) return sum;
  long long &m = memo[i][pre][sum];
  if (m != -1) return m;
  long long ans = 0;
  for (int d = 0; d <= 9; d++) {
    if (pre && d > num[i]) break;
    ans += solve(i + 1, pre && (d == num[i]), sum + d);
  }
  return m = ans;
}
int count_dig(long long x) {
  int ret = 0;
  while (x != 0) {
    num[ret++] = x % 10;
    x /= 10;
  }
  for (int i = 0, j = ret - 1; i < j; i++, j--) {
    int aux = num[i];
    num[i] = num[j];
    num[j] = aux;
  }
  return ret;
}
int fx(long long x) {
  int sum = 0;
  while (x) {
    sum += x % 10;
    x /= 10;
  }
  return sum;
}
int main() {
  long long a, f;
  scanf("%lld", &a);
  long long l = 1, r = 100000000000000000ll;
  while (l < r) {
    long long mid = (l + r) / 2;
    n = count_dig(mid);
    memset(memo, -1, sizeof memo);
    f = solve(0, 1, 0);
    if (f >= a)
      r = mid;
    else
      l = mid + 1;
  }
  n = count_dig(l);
  memset(memo, -1, sizeof memo);
  f = solve(0, 1, 0) % a;
  l = 1;
  while (f) {
    if (f > 0) {
      f -= fx(l);
      l++;
    } else {
      f += fx(r + 1);
      r++;
    }
  }
  printf("%lld %lld\n", l, r);
  return 0;
}
