In a distant magical kingdom, there lived a famous wizard named Merlin. He was known for his magical abilities and the skill to create magical items. One day, Merlin created a magic square of size $$$n$$$ by $$$n$$$, with each cell containing an integer from $$$1$$$ to $$$n^2$$$, and all numbers being distinct. The magic square had amazing properties: all rows and all columns had the same sum of numbers.
However, one day, when Merlin was momentarily distracted, the evil sorcerer Gargamel sneaked into his laboratory and decided to cause harm. He swapped two numbers in the magic square, hoping to spoil its magical power.
Now Merlin needs your help to determine which numbers were swapped.
The first line contains a single number $$$n$$$ ($$$3 \le n \le 1000$$$)—the size of the square. In the following $$$n$$$ lines, there are $$$n$$$ numbers $$$a_{ij}$$$ ($$$1 \le a_{ij} \le n^2$$$). It is guaranteed that all numbers are distinct. It is guaranteed that there are two numbers that can be swapped to make the square magical again.
You are required to output four numbers $$$r_1$$$, $$$c_1$$$, $$$r_2$$$, and $$$c_2$$$—the row number and the column number of the first number and the row number and the column number of the second number that need to be swapped to make the square magical again. Rows and columns are numbered from top to bottom and from left to right, respectively, starting with one.
36 9 23 5 78 1 4
1 1 3 3