#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, m;
  cin >> n >> m;
  int sum = 4;
  string s = "4";
  while (sum < n) {
    sum += 4;
    s.push_back('4');
  }
  s.push_back('5');
  cout << s << "\n";
  for (int i = 0; i < s.length(); i++) {
    cout << '5';
  }
  cout << "\n";
}
