#include <bits/stdc++.h>
int f1(long long int n) {
  long long int a, count = 0;
  for (a = 2; a < n; a++) {
    if (n % a == 0) count++;
  }
  return (count >= 1);
}
int main() {
  long long int n;
  scanf("%lld", &n);
  long long int a, b = 4;
  while (1) {
    a = n + b;
    if (f1(a) && f1(b)) {
      printf("%lld %lld\n", a, b);
      break;
    }
    b++;
  }
}
