Magic Square#5300

Magic Square

1 second
64 megabytes
Medium

A magic square is a grid where the sum of the numbers in each row and each column is identical; there are no requirements for the sums of the diagonals.

Your task is to construct such a square using a given set of numbers.

Input

The input file provides distinct integers, each ranging from to .

Output

The output file should display the numbers arranged to form a 4 \times 4 magic square, with each number appearing exactly once, arranged in four rows of four numbers each. If it is not possible to construct such a square, output the line NO SOLUTION.

Examples

Example 1

Loading
Loading