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;
const int N = 100000 + 10;
const int MOD = 1000000000 + 7;
unsigned long long a;
unsigned long long g[N];
unsigned long long v[N];
char ret[N];
void solve() {
  cin >> a;
  g[1] = 45 % a;
  v[1] = 10 % a;
  for (int i = 2; i <= 100; ++i) {
    g[i] = 0;
    v[i] = v[i - 1] * 10 % a;
    for (int j = 0; j < 10; ++j) {
      (g[i] += j * v[i - 1]) %= a;
      (g[i] += g[i - 1]) %= a;
    }
  }
  int d = 100;
  long long ans = (-(1 + (long long)g[d] + (long long)v[d - 1]) + (long long)a +
                   (long long)a) %
                  a;
  long long rec = ans;
  for (int i = 0; i < d; ++i) {
    ret[i] = '0';
  }
  ret[d - 1] = '1';
  ans = ans + 1;
  int tmp = 0;
  do {
    ret[tmp] = ans % 10 + '0';
    ++tmp;
    ans /= 10;
  } while (ans);
  for (int i = d - 1; i >= 0; --i) {
    putchar(ret[i]);
  }
  cout << endl;
  for (int i = 0; i < d; ++i) {
    ret[i] = '0';
  }
  ret[d - 1] = '1';
  ret[d] = '1';
  ans = rec;
  tmp = 0;
  do {
    ret[tmp] = ans % 10 + '0';
    ++tmp;
    ans /= 10;
  } while (ans);
  for (int i = d; i >= 0; --i) {
    putchar(ret[i]);
  }
  cout << endl;
}
int main() {
  solve();
  return 0;
}
