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 comment(linker, "/STACK:36777216")
using namespace std;
const int N = 1e5 + 7;
const long long INF = 0x3ffffffffffLL;
const int MOD = 1e9 + 7;
const double EPS = 1e-8;
int gao(long long x) {
  int ret = 0;
  while (x) ret += (x % 10), x /= 10;
  return ret;
}
long long calc(long long x) {
  long long ret = 0, l, po = 1, r = 0;
  while (x) {
    l = x / 10;
    ret += l * 45 * po;
    long long digit = x % 10;
    ret += (digit - 1) * digit / 2 * po;
    ret += digit * (r + 1);
    r = r + digit * po;
    x /= 10;
    po *= 10;
  }
  return ret;
}
long long n;
int main() {
  long long l = 0, r = 20000000000000000;
  cin >> n;
  bool flag = false;
  while (l < r) {
    long long mid = l + r >> 1;
    long long temp = calc(mid);
    if (temp < n)
      l = mid + 1;
    else if (temp > n)
      r = mid;
    else {
      cout << 1 << ' ' << mid << endl;
      return 0;
    }
  }
  long long tot = calc(l);
  r = l;
  l = 1;
  while (1) {
    if (tot < n)
      r++, tot += gao(r);
    else if (tot > n)
      tot -= gao(l), l++;
    else {
      cout << l << ' ' << r << endl;
      return 0;
    }
  }
}
