eolymp
bolt
Try our new interface for solving problems
Problems

The system of linear equations

The system of linear equations

Time limit 2 seconds
Memory limit 64 MiB

Professor W. Pucher decided to hold a quiz on linear algebra among first-year students Baylor University. One of the assignments he made the decision system of linear equations. In preparation tasks eminent professor was faced with a compilation of various systems of equations for a sufficiently large number of students. In the end, he instructed graduate students write a generator coefficients. Those, of course, coped with the task and wrote a program that is N linear equations with N unknowns. Also, they provided a program for solving the systems obtained. But W. Pucher questioned the responses received in this program, and asked you to develop another, which would give the correct answers. Help the professor, and he will help you. :)

Input data

In the first line of input file number N (0 < N < 7). The next N lines (not longer than 255 characters) contain descriptions of the equations. The equation may be found the names of the variables (x1, x2, x3, x4, x5, x6), as well as not too big integers and arithmetic signs (+, -, *, /). They may be separated by spaces. In each equation necessarily contains an equal sign (=).

Output data

If a given system has a unique solution, it is required to withdraw the phrase "1 solution.", and then each line in the lexicographic order with no spaces the values that make the variables in the form of ordinary irreducible fractions: numerator and denominator by a "/". If the answer is ineger, then bring out only the numerator. With an infinite number of decisions need to print the phrase "Infinite solutions.". If the system has no solutions, then bring out the string "No solution." It is guaranteed that the number of response does not exceed one billion.

Examples

Input example #1
3
x1 + x2 +   x3  = 1
2*x1 +x2+2*x3  =1
x1+x2+3*x3=2
Output example #1
1 solution.
x1=-1/2
x2=1
x3=1/2