#include <bits/stdc++.h>
using namespace std;
inline char gc() {
  static char now[1 << 16], *S, *T;
  if (T == S) {
    T = (S = now) + fread(now, 1, 1 << 16, stdin);
    if (T == S) return EOF;
  }
  return *S++;
}
inline int64_t read() {
  register int64_t x = 0, f = 1;
  char ch = gc();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = gc();
  }
  while (isdigit(ch)) {
    x = (x << 3) + (x << 1) + ch - '0';
    ch = gc();
  }
  return (f == 1) ? x : -x;
}
void print(int64_t x) {
  if (!x) return;
  if (x < 0) putchar('-'), x = -x;
  print(x / 10);
  putchar(x % 10 + '0');
}
int64_t ljc, has[202];
int B;
pair<int64_t, int64_t> dp[25][2];
inline int getbit(int64_t x) {
  register int ans = 0;
  while (x) {
    ans += x % 10;
    x /= 10;
  }
  return ans;
}
int X[23];
pair<int64_t, int64_t> dfs(int len, bool lim) {
  if (len == 0) return make_pair(0, 1);
  if (~dp[len][lim].first) return dp[len][lim];
  int big = (lim ? X[len] : 9);
  pair<int64_t, int64_t> res = make_pair(0, 0);
  for (int i = 0; i <= big; i++) {
    pair<int64_t, int64_t> now = dfs(len - 1, (lim & (i == big)));
    res.second += now.second;
    res.first += (int64_t)i * now.second + now.first;
  }
  return (dp[len][lim] = res);
}
inline int64_t check(int64_t mid) {
  int Len = 0;
  for (; mid; mid /= 10) X[++Len] = mid % 10;
  for (int i = 1; i <= Len; i++) dp[i][1] = make_pair(-1, -1);
  return dfs(Len, 1).first;
}
signed main() {
  for (int i = 1; i <= 23; i++) dp[i][0] = make_pair(-1, -1);
  ljc = read();
  B = min(ljc, (int64_t)200);
  for (int64_t las = 1, bit = 0;; bit++) {
    int64_t lb = las, rb = 1e17, ans = 0;
    while (lb <= rb) {
      int64_t mid = (lb + rb) / 2;
      if (check(mid) / ljc >= bit)
        rb = mid - 1, ans = mid;
      else
        lb = mid + 1;
    }
    las = ans;
    int64_t now = check(ans) % ljc;
    for (; now <= B; now += getbit(++las)) {
      if (has[now]) {
        print(has[now] + 1), putchar(' '), print(las);
        return 0;
      } else
        has[now] = las;
    }
  }
  return 0;
}

### Prompt

Construct a cpp code solution to the problem outlined:

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;
inline char gc() {
  static char now[1 << 16], *S, *T;
  if (T == S) {
    T = (S = now) + fread(now, 1, 1 << 16, stdin);
    if (T == S) return EOF;
  }
  return *S++;
}
inline int64_t read() {
  register int64_t x = 0, f = 1;
  char ch = gc();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = gc();
  }
  while (isdigit(ch)) {
    x = (x << 3) + (x << 1) + ch - '0';
    ch = gc();
  }
  return (f == 1) ? x : -x;
}
void print(int64_t x) {
  if (!x) return;
  if (x < 0) putchar('-'), x = -x;
  print(x / 10);
  putchar(x % 10 + '0');
}
int64_t ljc, has[202];
int B;
pair<int64_t, int64_t> dp[25][2];
inline int getbit(int64_t x) {
  register int ans = 0;
  while (x) {
    ans += x % 10;
    x /= 10;
  }
  return ans;
}
int X[23];
pair<int64_t, int64_t> dfs(int len, bool lim) {
  if (len == 0) return make_pair(0, 1);
  if (~dp[len][lim].first) return dp[len][lim];
  int big = (lim ? X[len] : 9);
  pair<int64_t, int64_t> res = make_pair(0, 0);
  for (int i = 0; i <= big; i++) {
    pair<int64_t, int64_t> now = dfs(len - 1, (lim & (i == big)));
    res.second += now.second;
    res.first += (int64_t)i * now.second + now.first;
  }
  return (dp[len][lim] = res);
}
inline int64_t check(int64_t mid) {
  int Len = 0;
  for (; mid; mid /= 10) X[++Len] = mid % 10;
  for (int i = 1; i <= Len; i++) dp[i][1] = make_pair(-1, -1);
  return dfs(Len, 1).first;
}
signed main() {
  for (int i = 1; i <= 23; i++) dp[i][0] = make_pair(-1, -1);
  ljc = read();
  B = min(ljc, (int64_t)200);
  for (int64_t las = 1, bit = 0;; bit++) {
    int64_t lb = las, rb = 1e17, ans = 0;
    while (lb <= rb) {
      int64_t mid = (lb + rb) / 2;
      if (check(mid) / ljc >= bit)
        rb = mid - 1, ans = mid;
      else
        lb = mid + 1;
    }
    las = ans;
    int64_t now = check(ans) % ljc;
    for (; now <= B; now += getbit(++las)) {
      if (has[now]) {
        print(has[now] + 1), putchar(' '), print(las);
        return 0;
      } else
        has[now] = las;
    }
  }
  return 0;
}

```