#include <bits/stdc++.h>
using namespace std;
#pragma warning(disable : 4996)
const unsigned long long i = 200;
unsigned long long p, i1;
long long i2 = ((long long)1) << 58;
long long d[i], d1[i];
int k(long long e) {
  int t = 0;
  while (e) {
    t += e % 10;
    e /= 10;
  }
  return t;
}
long long a[20];
unsigned long long s[20];
unsigned long long l(unsigned long long q) {
  int w, e, t = 0;
  unsigned long long r, ans = 0, c;
  while (q > 0) {
    a[t] = q % 10;
    t++;
    q /= 10;
  }
  r = 1;
  s[0] = 0;
  for (w = 1; w < t; w++) {
    s[w] = a[w - 1] * r + s[w - 1];
    r *= 10;
  }
  c = r;
  r = 0;
  for (t--; t >= 0; t--) {
    for (w = 1; w < 10; w++) {
      if (w < a[t])
        ans += (r + 1) * w * c;
      else
        ans += (r)*w * c;
      if (ans >= p) return p;
    }
    ans += (s[t] + 1) * a[t];
    if (ans >= p) return p;
    r = r * 10 + a[t];
    c /= 10;
  }
  return ans;
}
void pr(unsigned long long c1, int w) {
  int e;
  unsigned long long c;
  if (w) {
    cout << 1;
    for (e = 1; e < w; e++) cout << 0;
    c = 1;
    for (e = 0; e < 17; e++) c *= 10;
    for (e = 16; e >= 0; e--) {
      c /= 10;
      cout << c1 / c;
      c1 %= c;
    }
  } else
    cout << c1;
}
int main() {
  int q, w, r;
  long long e;
  unsigned long long t, t1, c, c1, v;
  i1 = 1;
  for (w = 0; w < 17; w++) i1 *= 10;
  for (w = 0; w < i; w++) d[w] = d1[w] = -1;
  d[0] = d1[0] = 0;
  cin >> p;
  for (w = 0; w < 200; w++) {
    t = 0;
    if (w) {
      c = 1;
      for (e = 2; e < w + 17; e++) c = (c * 10) % p;
      c1 = 0;
      for (e = 1; e < w + 17; e++) {
        c1 += c;
        if (c1 >= p) c1 -= p;
      }
      for (e = 1; e < 10; e++) t = (t + c1 * e) % p;
      t = (t + 1) % p;
    }
    c1 = 0;
    for (v = i2; v; v >>= 1) {
      c = c1 + v;
      t1 = l(c);
      if (w) t1 += c;
      if (t + t1 < p) c1 = c;
    }
    t += l(c1);
    if (w) t += c1;
    t = t + k(c1 + 1);
    if (w) t++;
    t %= p;
    if (t >= i) continue;
    if (d[t] < 0) {
      d[t] = c1 + 1;
      d1[t] = w;
    } else {
      pr(d[t] + 1, d1[t]);
      cout << " ";
      pr(c1 + 1, w);
      return 0;
    }
  }
  return 0;
}

### Prompt

Please formulate a cpp solution to the following problem:

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;
#pragma warning(disable : 4996)
const unsigned long long i = 200;
unsigned long long p, i1;
long long i2 = ((long long)1) << 58;
long long d[i], d1[i];
int k(long long e) {
  int t = 0;
  while (e) {
    t += e % 10;
    e /= 10;
  }
  return t;
}
long long a[20];
unsigned long long s[20];
unsigned long long l(unsigned long long q) {
  int w, e, t = 0;
  unsigned long long r, ans = 0, c;
  while (q > 0) {
    a[t] = q % 10;
    t++;
    q /= 10;
  }
  r = 1;
  s[0] = 0;
  for (w = 1; w < t; w++) {
    s[w] = a[w - 1] * r + s[w - 1];
    r *= 10;
  }
  c = r;
  r = 0;
  for (t--; t >= 0; t--) {
    for (w = 1; w < 10; w++) {
      if (w < a[t])
        ans += (r + 1) * w * c;
      else
        ans += (r)*w * c;
      if (ans >= p) return p;
    }
    ans += (s[t] + 1) * a[t];
    if (ans >= p) return p;
    r = r * 10 + a[t];
    c /= 10;
  }
  return ans;
}
void pr(unsigned long long c1, int w) {
  int e;
  unsigned long long c;
  if (w) {
    cout << 1;
    for (e = 1; e < w; e++) cout << 0;
    c = 1;
    for (e = 0; e < 17; e++) c *= 10;
    for (e = 16; e >= 0; e--) {
      c /= 10;
      cout << c1 / c;
      c1 %= c;
    }
  } else
    cout << c1;
}
int main() {
  int q, w, r;
  long long e;
  unsigned long long t, t1, c, c1, v;
  i1 = 1;
  for (w = 0; w < 17; w++) i1 *= 10;
  for (w = 0; w < i; w++) d[w] = d1[w] = -1;
  d[0] = d1[0] = 0;
  cin >> p;
  for (w = 0; w < 200; w++) {
    t = 0;
    if (w) {
      c = 1;
      for (e = 2; e < w + 17; e++) c = (c * 10) % p;
      c1 = 0;
      for (e = 1; e < w + 17; e++) {
        c1 += c;
        if (c1 >= p) c1 -= p;
      }
      for (e = 1; e < 10; e++) t = (t + c1 * e) % p;
      t = (t + 1) % p;
    }
    c1 = 0;
    for (v = i2; v; v >>= 1) {
      c = c1 + v;
      t1 = l(c);
      if (w) t1 += c;
      if (t + t1 < p) c1 = c;
    }
    t += l(c1);
    if (w) t += c1;
    t = t + k(c1 + 1);
    if (w) t++;
    t %= p;
    if (t >= i) continue;
    if (d[t] < 0) {
      d[t] = c1 + 1;
      d1[t] = w;
    } else {
      pr(d[t] + 1, d1[t]);
      cout << " ";
      pr(c1 + 1, w);
      return 0;
    }
  }
  return 0;
}

```