| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 512 MB | 566 | 453 | 425 | 80.645% |
In Innokingdom there are special horses for chess knights, innohorses. Each innohorse is represented by a pair of integers $(x, y),ドル 0ドル \le x \le y$. Innohorse moves in the following way: first it moves $x$ cells in one of the four general directions, then turns 90 degrees to the left or to the right, then finally moves $y$ more cells. For instance, an ordinary chess knight horse is an innohorse of type $(1, 2)$.
Alex and Jane has just seen one innohorse, it jumped from cell A to cell B. They wonder what is the type of this innohorse. Help them answer this question.
Chessboard consists of 8 rows and 8 columns. Rows are assigned integers from 1 to 8, and columns are assigned letters from 'a' to 'h'. So every cell is represented by a pair of a letter and a digit.
Two lines consist of descriptions of cells A and B respectively.
Print two integers $x$ and $y$ (0ドル \le x \le y$), representing the type of innohorse.
a1 b3
1 2
g5 d3
2 3