#include <bits/stdc++.h>
long long m = 1000000007;
long long sieve[1000001] = {0}, i, j;
long long power(long long p, long long k) {
  long long a = 1;
  while (k) {
    if (k & 1) a = (a * p) % m;
    p = (p * p) % m;
    k >>= 1;
  }
  return a;
}
long long prime(long long n) {
  for (long long i = 2; i <= sqrt(n); i++)
    if (n % i == 0) return 1;
  return 0;
}
using namespace std;
int main() {
  long long tc = 1;
  long long k, n;
  cin >> n;
  k = n;
  for (i = 2; i <= 10000000; i++)
    if (prime(i) && prime(i + k)) {
      cout << i + n << " " << i;
      break;
    }
}
