#include <bits/stdc++.h>
using namespace std;
bool prime(int n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (int i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
int main() {
  int n, a, b = 4;
  cin >> n;
  while (1) {
    a = b + n;
    if ((prime(a) == 0) && (prime(b) == 0)) {
      cout << a << " " << b << endl;
      break;
    }
    b++;
    if (prime(b) == 0) b++;
  }
  return 0;
}
