#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int i = 4;
  bool found = false;
  while (!found) {
    int a = i, b = i + n;
    bool checkA = false, checkB = false;
    for (int j = 2; j <= ceil(b / 2); j++) {
      if (b % j == 0) {
        checkB = true;
        break;
      }
    }
    for (int j = 2; j <= ceil(a / 2); j++) {
      if (a % j == 0) {
        checkA = true;
        break;
      }
    }
    if (checkA && checkB) {
      if (a > b)
        cout << a << ' ' << b;
      else
        cout << b << ' ' << a;
      found = true;
    }
    i++;
  }
}
