#include <bits/stdc++.h>
using namespace std;
int main() {
  double n, m, h;
  string s, t;
  cin >> n >> m;
  h = ceil((n - 5) / 4);
  for (int i = 0; i < h; i++) {
    s += "4";
    t += "5";
  }
  s += "5";
  t += "5";
  cout << s << " " << t;
  return 0;
}
