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 double pi = acos(-1);
long long mul[20], Res[20], a[20];
int n;
long long A;
void init() {
  mul[0] = 1;
  for (int i = 1; i <= 18; i++) mul[i] = mul[i - 1] * 10;
  Res[0] = 0;
  Res[1] = 45;
  for (int i = 2; i <= 17; i++) Res[i] = mul[i - 1] * i * 45;
}
void creat(long long X) {
  n = 0;
  while (X > 0) {
    n++;
    a[n] = X % 10;
    X = X / 10;
  }
}
long long cal(long long X) {
  creat(X);
  long long result = 0;
  result = Res[n - 1];
  for (int i = n; i >= 1; i--) {
    for (int j = 0; j < a[i]; j++)
      if (j > 0 || (j == 0 && i < n))
        result = result + Res[i - 1] + mul[i - 1] * j;
    X = X - mul[i - 1] * a[i];
    result = result + (X + 1) * a[i];
  }
  return result;
}
bool check(long long X) {
  long long X1 = cal(X);
  long long dau = 0, cuoi = X;
  while (dau + 1 < cuoi) {
    long long giua = (dau + cuoi) / 2;
    if (X1 - cal(giua) >= A)
      dau = giua;
    else
      cuoi = giua;
  }
  if (X1 - cal(dau) == A) {
    cout << dau + 1 << ' ' << X << endl;
    return true;
  }
  return false;
}
void solve() {
  long long dau = 0, cuoi = 100000000000000000;
  while (dau + 1 < cuoi) {
    long long giua = (dau + cuoi) / 2;
    if (cal(giua) >= A)
      cuoi = giua;
    else
      dau = giua;
  }
  while (1) {
    if (check(cuoi)) break;
    cuoi++;
  }
}
int main() {
  cin >> A;
  init();
  solve();
  return 0;
}
