#include <bits/stdc++.h>
int lalala(int k) {
  int b, c, d, i;
  for (i = k / 2; i > 1; i--) {
    if (k % i == 0) break;
  }
  if (i == 1)
    return 0;
  else
    return 1;
}
int main(void) {
  int a, b, x, m, n;
  scanf("%d", &n);
  int i, j;
  for (i = 4; i <= 109; i++) {
    a = i;
    b = i + n;
    if (lalala(a) == 1 && lalala(b) == 1) break;
  }
  printf("%d %d", b, a);
  return 0;
}
