#include <bits/stdc++.h>
using namespace std;
template <typename T>
void out(T x) {
  cout << x << endl;
  exit(0);
}
const int maxn = 1e6 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  int m;
  cin >> n >> m;
  int need = (n + 4 - 1) / 4;
  string a = "5";
  int tota = 5;
  while ((int)a.size() < need) {
    a += '5';
    tota += 5;
  }
  string b = "5";
  int totb = 5;
  while ((int)b.size() < need) {
    b += '4';
    totb += 4;
  }
  reverse(a.begin(), a.end());
  reverse(b.begin(), b.end());
  cout << a << "\n";
  cout << b << "\n";
  return 0;
}
