#include <bits/stdc++.h>
using namespace std;
int n, m, i, cnt;
int main() {
  cin >> n >> m;
  while (n > 5) {
    cout << 4;
    cnt++;
    n -= 4;
  }
  cout << 5 << '\n';
  for (i = 0; i <= cnt; i++) cout << 5;
  return 0;
}
