eolymp
bolt
Try our new interface for solving problems
Problems

Divide and Conquer

Divide and Conquer

\includegraphics{https://static.e-olymp.com/content/a6/a6ef25465ad554be5755792f9bfa65e295b20630.jpg} It is well known that \textbf{n} points can divide the line to at most \textbf{n+1} parts, and \textbf{n} lines can divide the plane to at most parts. This facts have always impressed Buddy. But recently he has learned about higher-dimensional spaces and this impressed him much more! Now Buddy wonders how many parts can \textbf{n} hyperplanes divide m-dimensional space to. His elder brother Dubby told him that for each \textbf{m} this number can be represented as a polynomial for \textbf{n} with rational coefficients. Help him to find this polynomial. \InputFile Input file contains \textbf{m} (\textbf{1} ≤ \textbf{m} ≤ \textbf{18}). \OutputFile On the first line of the output file print the degree of the polynomial. On the second line output coefficients of the polynomial, sepearted by spaces. Coefficicients must be listed starting from the leading one. All coefficients must be printed as irreducible fractions, if some coefficient is negative, minus sign must preceed its nominator, not denomimator.
Time limit 1 second
Memory limit 64 MiB
Input example #1
1
Output example #1
1
1/1 1/1
Source Russian Teams Training Sessions in Petrozavodsk, Summer 2004, Andrew Stankevich Contest 8, Thursday, August 26, 2004