#include <bits/stdc++.h>
using namespace std;
bool is_prime(int n) {
  int i;
  bool isPrime = true;
  for (i = 2; i <= n / 2; ++i) {
    if (n % i == 0) {
      isPrime = false;
      break;
    }
  }
  return isPrime;
}
int main() {
  int number;
  cin >> number;
  for (int b = 2;; b++) {
    int c = 0;
    if (!is_prime(b)) {
      int a = b + number;
      if (!is_prime(a)) {
        cout << a << " " << b << "\n";
        c = 1;
      }
    }
    if (c == 1) break;
  }
}
