Write a program that factors a polynomial with integer coefficients into irreducible polynomials, that is, polynomials with integer coefficients which cannot be further factored into binomials with integer coefficients. You do not need to represent numbers as arrays of their digits, as long as integers are stored in bytes.
The first line contains a natural number (n < 100) — the degree of the polynomial.
The second line contains n + 1 integers — the coefficients of the polynomial, in descending order of degree, that is, from degree to .
Print the answer in the following format:
The first line should contain the sign of the leading coefficient and the greatest common divisor of all coefficients.
Each of the following lines should contain, in order:
The multiplicity of the divisor in the factorization of the original polynomial,
The degree of the polynomial divisor,
The coefficients of the divisor, in descending order of degree (the leading coefficient should be positive).
Starting from the second line, as the line number increases, the third number (leading coefficient of the binomial) should not decrease. For binomial divisors with the same leading coefficient, output first the binomial of lower degree. For divisors of the same degree and the same leading coefficient, output first the binomial with a negative constant term (last number on the line).
The polynomial divisor that is not a binomial (that is, the remainder after dividing the polynomial by all its binomial divisors, with multiplicity taken into account) should be written on the last line.
Each number should be no more than two digits.
Example 1