Problems
Ordered Fractions
Ordered Fractions
Consider the set of all reduced fractions between \textbf{0} and \textbf{1} inclusive with denominators less than or equal to \textbf{N}.
Here is the set when \textbf{N} = \textbf{5}:
\begin{verbatim}
\end{verbatim}Write a program that, given an integer \textbf{N} between \textbf{1} and \textbf{160} inclusive, prints the fractions in order of increasing magnitude.
\InputFile
One line with a single integer \textbf{N}.
\OutputFile
One fraction per line, sorted in order of magnitude.
Input example #1
5
Output example #1
0/1 1/5 1/4 1/3 2/5 1/2 3/5 2/3 3/4 4/5 1/1