#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 1e6 + 10;
ll n, t;
bool isPrime(int n) {
  if (n <= 1) return 0;
  for (int i = 2; i < n; i++)
    if (n % i == 0) return 0;
  return 1;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  for (int i = 4; i <= 1e7; i++) {
    if (!isPrime(i) && !isPrime(i + n))
      return cout << i + n << " " << i << "\n", 0;
  }
  return 0;
}
