#include <bits/stdc++.h>
using namespace std;
long long T = 1e18;
long long T1 = 1e17;
int main() {
  long long A, P = 1;
  cin >> A;
  for (int i = 0; i < 810; i++) {
    P += T1;
    P %= A;
  }
  long long K = (P == 0 ? 0 : (A - P));
  cout << 1 + K << " " << T + K << "\n";
  return 0;
}
