#include <bits/stdc++.h>
bool isPrime(long long int x) {
  if (x <= 4 || x % 2 == 0 || x % 3 == 0) return x == 2 || x == 3;
  for (int i = 5; i * i <= x; i += 6)
    if (x % i == 0 || x % (i + 2) == 0) return 0;
  return 1;
}
using namespace std;
inline void boostIO() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.precision(10);
}
const long long INF = 1e18;
long long gcd(long long a, long long b) {
  long long k = 1;
  while (a != b) {
    if (a > b)
      a -= b;
    else
      b -= a;
  }
  if (a == b) k = a;
  return k;
}
long long optpow(long long a, long long b, long long k) {
  if (b == 0) return 1;
  long long tmp = optpow(a, b / 2, k);
  if (b % 2 == 1) {
    return ((tmp * tmp) % k * a) % k;
  } else {
    return (tmp * tmp) % k;
  }
}
long long qckpow(long long a, long long b) {
  if (b == 0) return 1;
  long long tmp = qckpow(a, b / 2);
  if (b % 2 == 1) {
    return ((tmp * tmp) * a);
  } else {
    return (tmp * tmp);
  }
}
long long const maxn = 100000;
vector<long long> tree[4 * maxn];
long long sz;
void build(vector<long long> a) {
  sz = 1;
  long long n = a.size();
  while (sz <= n) sz <<= 1;
  for (long long i = 0; i < n; ++i) {
    tree[i + sz] = {a[i]};
  }
  for (long long i = sz - 1; i > 0; --i)
    merge(tree[2 * i].begin(), tree[2 * i].end(), tree[2 * i + 1].begin(),
          tree[2 * i + 1].end(), back_inserter(tree[i]));
}
long long get(long long ql, long long qr, long long x, long long tl = 0,
              long long tr = sz - 1, long long v = 1) {
  if (ql <= tl && tr <= qr)
    return upper_bound(tree[v].begin(), tree[v].end(), x) - tree[v].begin();
  long long mid = (tl + tr) / 2;
  long long res = -1;
  long long ind = -1;
  if (ql <= mid) {
    ind = get(ql, qr, x, tl, mid, 2 * v);
    res = max(res, ind);
  }
  if (qr > mid) {
    ind = get(ql, qr, x, mid + 1, tr, 2 * v + 1);
    res = max(res, ind);
  }
  return res;
}
vector<long long> divide(long long n) {
  vector<long long> p;
  while (n > 0) {
    p.push_back(n % 10);
    n /= 10;
  }
  reverse(p.begin(), p.end());
  return p;
}
int32_t main() {
  boostIO();
  long long n = 0, m, ans = 0, k = 0;
  long long q = 0;
  cin >> n;
  long long a = 4;
  while (1) {
    if (isPrime(a + n) != 1 && isPrime(a) != 1) break;
    a++;
  }
  cout << a + n << " " << a;
}
