#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, m;
  cin >> n >> m;
  string s = "";
  long long k = 0;
  while (k < n) {
    s += "4";
    k += 4;
  }
  long long sz = s.length() - 1;
  s.erase(sz);
  s += "5";
  sz = s.length();
  for (long long i = 0; i < sz; i++) {
    cout << 5;
  }
  cout << endl;
  cout << s;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t;
  t = 1;
  while (t--) {
    solve();
  }
}
