function main(input) {
  const arr = input.split(' ');
  const month = arr[0];
  const day = arr[1];
  console.log(month);
  console.log(day);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));