In a square matrix with n rows, all elements are integers. You can swap two elements of the matrix at one step. Find out the minimal number of steps necessary to obtain a symmetric matrix from the initial one. A symmetric matrix is a matrix with the same element at the intersection of the ith row and jth column as that at the intersection of the jth row and the ith column for any i, j.
It is guaranteed that in this matrix, n elements occur only once, and each of the rest occurs twice.
The first line of the input file contains an integer n --- the number of rows in the matrix (1≤n≤500). The following n lines describe the rows of the matrix. Each of them contains n space-separated integers, which are not greater than 109 in absolute value.
In the first line of the output file, print a single integer m --- the minimal number of steps to obtain a symmetric matrix. Next, print an example of m such steps. For the ith step, print four integers a_i, b_i, c_i, d_i into a separate line, which mean that the element located in the a_ith row and the b_ith column must be swapped with the element in the c_ith row and the d_ith column.