The shortest path of two knights#1420

The shortest path of two knights

1 second
64 megabytes
Easy

Move each of two knights from their starting positions to their respective destination squares using the minimum total number of moves. The two knights must not occupy the same square at the same time.

Input

The input first contains the coordinates of the first and second knights, followed by the coordinates of their destination squares.

Output

Output the sequence of moves for the knights, with each move on a separate line. Each line should begin with the knight's number ( or ), followed by a space, then the coordinates of the square to which the knight moves. Output any one of the possible optimal solutions.

Examples

Example 1

Loading
Loading