The meeting place cannot be changed.
Petya and Vasya, two good friends, decided to play hide and seek in a maze. After a few hours, they grew tired and wanted to meet up as quickly as possible.
The maze is a rectangular grid consisting of N×M cells, where each cell is either a wall or a passage. Petya and Vasya can move from one cell to an adjacent cell, provided the cells share a side. They cannot move into cells that contain a wall. Both can move simultaneously. Your task is to determine a cell where Vasya and Petya can meet in the fewest possible moves.
Input
The first line contains two integers 1 ≤ N, M ≤ 100, representing the dimensions of the maze. The next line contains four integers: P_x, P_y, V_x, V_y, which are the starting coordinates of Petya and Vasya, respectively. It is guaranteed that neither Petya nor Vasya starts in a cell with a wall (P_x, V_x are row numbers, P_y, V_y are column numbers). Following this, there are N rows, each containing M numbers, where 1 indicates a wall and 0 indicates a passage.
Output
Output two integers X_m, Y_m, which are the coordinates of the cell where they can meet. If it is impossible for them to meet, output -1. If there are multiple possible meeting points, you may output any one of them.