#include <bits/stdc++.h>
using namespace std;
bool isprime(int n) {
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0 || (n - i) % n == 0) return false;
  }
  return true;
}
int main() {
  int n;
  cin >> n;
  if (isprime(n + 8)) {
    cout << n + 9 << " " << 9;
  } else
    cout << n + 8 << " " << 8;
  return 0;
}
