#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m;
  cin >> n >> m;
  string s1 = "5";
  string s2 = "5";
  n -= 5;
  while (n > 0) {
    s1 = "4" + s1;
    s2 = "5" + s2;
    n -= 4;
  }
  cout << s1 << endl << s2 << endl;
  return 0;
}
