#include <bits/stdc++.h>
using namespace std;
int main(void) {
  long long a, c = 0;
  cin >> a;
  for (int i = 1; i <= 45 * 18; ++i) c = (c + (long long)(1e17)) % a;
  return cout << a - c << ' ' << (long long)(a - c + (long long)(1e18) - 1)
              << '\n',
         0;
}
