#include <bits/stdc++.h>
using namespace std;
long long INF = 1e18;
template <class T>
inline void read(T &f) {
  f = 0;
  T x = 1;
  char ch = getchar();
  while (ch < 48 || ch > 57) {
    if (ch == '-') {
      x = -1;
    }
    ch = getchar();
  }
  while (ch <= 57 && ch >= 48) {
    f = f * 10 + ch - '0';
    ch = getchar();
  }
  f *= x;
}
template <class T>
void print(T x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x > 9) {
    print(x / 10);
  }
  putchar(x % 10 + '0');
}
long long n;
long long ans;
int main() {
  read(n);
  ans = (INF % n * 3 % n * 3 % n * 3 % n * 3 % n + 1 % n) % n;
  print(n - ans + 1);
  cout << " ";
  print(INF + n - ans);
  return 0;
}
