#include <bits/stdc++.h>
using namespace std;
int main() {
  long long SUM = 1, N, UM = 1e18, TUM = 1e17;
  cin >> N;
  for (int i = 0; i < 810; i++) {
    SUM += TUM;
    SUM %= N;
  }
  long long tmp = N - SUM;
  cout << (1 + tmp) << " " << (UM + tmp) << endl;
  return 0;
}
