#include <bits/stdc++.h>
using namespace std;
void mod(long long &a, long long b) {
  a %= b;
  if (a < 0) a += b;
}
const long long INFLL = 100000000000000000ll;
const long long MOD = 1000000007;
long long A;
long long digs(long long n) {
  long long ret = 0;
  while (n > 0) ret++, n /= 10;
  return ret;
}
long long g(long long n) {
  if (n < 10) return n * (n + 1) / 2;
  long long d = digs(n);
  long long x = 1;
  for (int t = (1); t <= (d - 1); t++) x *= 10ll;
  long long f = n / x;
  long long ret = 45ll * (x / 10) * (d - 1) * (f - 1);
  ret += f * (f - 1) / 2 * x;
  ret += f * (n % x + 1);
  ret += g(n % x);
  ret += g(x - 1);
  return ret;
}
long long fc(long long n) {
  long long ret = 0;
  while (n > 0) {
    ret += n % 10;
    n /= 10;
  }
  return ret;
}
int main() {
  cin >> A;
  long long a = 1, b = INFLL;
  while (b - a > 1) {
    long long p = (a + b) / 2;
    if (g(p) > A)
      b = p;
    else
      a = p;
  }
  if (g(a) >= a) b = a;
  a = 1;
  long long v = g(b);
  while (true) {
    b = max(a, b);
    if (v == A) break;
    if (v > A) {
      v -= fc(a);
      a++;
    } else {
      b++;
      v += fc(b);
    }
  }
  cout << a << " " << b << "\n";
}

### Prompt

Develop a solution in Cpp to the problem described below:

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

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
void mod(long long &a, long long b) {
  a %= b;
  if (a < 0) a += b;
}
const long long INFLL = 100000000000000000ll;
const long long MOD = 1000000007;
long long A;
long long digs(long long n) {
  long long ret = 0;
  while (n > 0) ret++, n /= 10;
  return ret;
}
long long g(long long n) {
  if (n < 10) return n * (n + 1) / 2;
  long long d = digs(n);
  long long x = 1;
  for (int t = (1); t <= (d - 1); t++) x *= 10ll;
  long long f = n / x;
  long long ret = 45ll * (x / 10) * (d - 1) * (f - 1);
  ret += f * (f - 1) / 2 * x;
  ret += f * (n % x + 1);
  ret += g(n % x);
  ret += g(x - 1);
  return ret;
}
long long fc(long long n) {
  long long ret = 0;
  while (n > 0) {
    ret += n % 10;
    n /= 10;
  }
  return ret;
}
int main() {
  cin >> A;
  long long a = 1, b = INFLL;
  while (b - a > 1) {
    long long p = (a + b) / 2;
    if (g(p) > A)
      b = p;
    else
      a = p;
  }
  if (g(a) >= a) b = a;
  a = 1;
  long long v = g(b);
  while (true) {
    b = max(a, b);
    if (v == A) break;
    if (v > A) {
      v -= fc(a);
      a++;
    } else {
      b++;
      v += fc(b);
    }
  }
  cout << a << " " << b << "\n";
}

```