#include <bits/stdc++.h>
using namespace std;
const int N = 25;
int main() {
  unsigned long long a;
  cin >> a;
  unsigned long long t = 1;
  for (int i = 0; i < N; i++) {
    unsigned long long q = t;
    for (int j = 0; j < 9; j++) t = (t + q) % a;
  }
  unsigned long long q = t;
  for (int i = 0; i < N; i++) t = (t + q) % a;
  q = t;
  for (int i = 0; i < 44; i++) t = (t + q) % a;
  t++;
  t %= a;
  cout << a - t + 1 << ' ';
  int c = 0;
  unsigned long long tmp = a - t;
  while (tmp) {
    c++;
    tmp /= 10;
  }
  cout << 1;
  for (int i = 0; i < N + 1 - c; i++) cout << 0;
  cout << a - t;
  return 0;
}
