#include <bits/stdc++.h>
using namespace std;
long long a, p;
int main() {
  scanf("%lld", &a);
  p = a - 1000000000000000000 % a * 9 % a * 9 % a;
  printf("%lld %lld", p, 999999999999999999 + p);
  return 0;
}
