#include <bits/stdc++.h>
using namespace std;
int n, m, len, s, a[10005], b[10005];
int main() {
  scanf("%d%d", &n, &m);
  len = 1;
  a[1] = 5;
  b[1] = 5;
  s = 5;
  while (s < n) len++, a[len] = 4, b[len] = 5, s += 4;
  for (int i = len; i >= 1; i--) printf("%d", a[i]);
  printf("\n");
  for (int i = len; i >= 1; i--) printf("%d", b[i]);
  printf("\n");
  return 0;
}
