#include <bits/stdc++.h>
long long n, prime[10000001], tot1;
bool p[100000001];
int main() {
  p[0] = p[1] = 1;
  for (long long i = 2; i < 100000001; i++) {
    if (!p[i]) prime[tot1++] = i;
    for (int j = 0; j < tot1 && i * prime[j] < 100000001; j++) {
      p[i * prime[j]] = 1;
      if (!(i % prime[j])) break;
    }
  }
  scanf("%lld", &n);
  for (long long i = 4; i < 100000001; i++) {
    if (p[i + n] && p[i]) {
      printf("%lld %lld", i + n, i);
      return 0;
    }
  }
  return 0;
}
