#include <bits/stdc++.h>
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  int t = (n - 1) / 9 + 1;
  for (int i = 0; i < t; i++) {
    putchar('9');
  }
  for (int i = 0; i < t - 1; i++) {
    putchar('0');
  }
  printf("1\n");
  for (int i = 0; i < t; i++) {
    putchar('9');
  }
  putchar('\n');
  return 0;
}
