#include <iostream>
using namespace std;

const int TEN = 10;

int main() {
  int no, discountCode;
  cin >> no >> discountCode;
  const int COPY_NO = no;
  while (no > 0) {
    discountCode *= TEN;
    no /= TEN;
  }
  cout << discountCode + COPY_NO << " " << (discountCode + COPY_NO) * 2;
  return 0;
}