#include <bits/stdc++.h>
using namespace std;
bool simp(long long ch) {
  for (int i = 2; i <= round(sqrt(ch)); i++) {
    if (ch % i == 0) {
      return true;
    }
  }
  return false;
}
void solve() {
  long long n;
  cin >> n;
  vector<int> vec;
  vec.push_back(4);
  vec.push_back(6);
  vec.push_back(9);
  vec.push_back(10);
  vec.push_back(12);
  vec.push_back(14);
  vec.push_back(15);
  vec.push_back(16);
  vec.push_back(18);
  vec.push_back(20);
  for (int i = 0; i < vec.size(); i++) {
    if (simp(n + vec[i])) {
      cout << n + vec[i] << " " << vec[i] << endl;
      return;
    }
  }
}
int main() {
  int q;
  solve();
}
