#include <bits/stdc++.h>
using namespace std;
int N;
bool check(int k) {
  int p = (int)ceil(sqrt(k));
  for (int i = 2; i <= p; ++i)
    if (k % i == 0) return 1;
  return 0;
}
int main() {
  cin >> N;
  int x = 200, y = x + N;
  for (;; ++x, ++y)
    if (check(x) && check(y)) return printf("%d %d\n", y, x), 0;
  return 0;
}
