You are given an n \times n matrix of integers. Your task is to select a set of coordinates (k_i, l_i) such that each row index k_i and each column index l_i is used exactly once, in order to minimize the sum of the selected matrix elements.
The first line contains a single integer (1 \leq n \leq 50). The following lines each contain integers, each within the range -10^6 to 10^6.
The first line should display the minimum possible sum. In the following lines, output the pairs of numbers representing the selected cells, with the row number given first.
Shembulli 1