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>
#pragma GCC optimize("Ofast")
using namespace std;
const long long int mod = 1e9 + 7;
const long long int mod1 = 998244353;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long int rand(long long int l, long long int r) {
  uniform_int_distribution<long long int> uid(l, r);
  return uid(rng);
}
long long int pre(long long int x) { return (x * (x + 1)) / 2; }
long long int pw[20], val[20];
long long int g(long long int x) {
  for (long long int i = 0; i <= 19; i++) {
    val[i] = x % 10;
    x /= 10;
  }
  long long int ans = 0, s = 0;
  for (long long int i = 19; i >= 0; i--) {
    if (val[i]) {
      ans += pre(val[i] - 1) * pw[i];
      if (i) ans += 45 * i * pw[i - 1] * val[i];
      ans += s * val[i] * pw[i];
      s += val[i];
    }
  }
  ans += s;
  return ans;
}
long long int dig(long long int x) {
  long long int s = 0;
  while (x) {
    s += x % 10;
    x /= 10;
  }
  return s;
}
long long int brute(long long int l, long long int r) {
  long long int s = 0;
  for (long long int i = l; i <= r; i++) {
    s += dig(i);
  }
  return s;
}
void solve() {
  pw[0] = 1;
  for (long long int i = 1; i <= 19; i++) {
    pw[i] = pw[i - 1] * 10;
  }
  long long int a;
  cin >> a;
  long long int l = 0, r = pw[17];
  while (r - l > 1) {
    long long int m = (l + r) >> 1;
    if (g(m) >= a)
      r = m;
    else
      l = m;
  }
  long long int s = g(r);
  for (long long int i = 1;; i++) {
    while (s < a) s += dig(++r);
    if (s == a) {
      cout << i << " " << r << '\n';
      return;
    }
    s -= dig(i);
  }
}
signed main() {
  ios ::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  clock_t clk = clock();
  long long int t;
  t = 1;
  while (t--) {
    solve();
  }
  cerr << '\n' << (double)(clock() - clk) / CLOCKS_PER_SEC;
  return 0;
}
