#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
int main() {
  ios_base::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  string s = "5";
  string t = "5";
  n -= 5;
  while (n > 0) {
    s = "5" + s;
    t = "4" + t;
    n -= 4;
  }
  cout << s << endl << t << endl;
  return 0;
}
