#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int cnt = 0, cur = 0;
  do {
    cur++;
  } while (cur * 5 < n);
  cnt = cur;
  cur = 0;
  do {
    cur++;
  } while (cur * 4 < n);
  cnt = max(cnt, cur);
  for (int i = 0; i < cnt; i++) cout << 5;
  cout << 1;
  cout << endl;
  for (int i = 0; i < cnt; i++) cout << 4;
  cout << 9;
}
