Problem G. Grouping of cells

Author:A. Baranov, A. Zhikhareva   Time limit:1 sec
Input file:input.txt   Memory limit:256 Mb
Output file:output.txt  

Statement

There is a rectangular table with unsigned integer values in cells.

Initially table was stored on separate lines, however during the processing formatting was lost and all separators (including line feeds) were replaces by spaces (ASCII 32). It is known that values in every column were the same.

Your program must find possible number of rows for initial table.

Input file format

Input file contains a sequence of cell values, separated by spaces.

Output file format

Output file must contain all possible variants for number of rows, in increasing order.

Constraints

All cell values are in range from 0 to 231 − 1.

Total number of cells is not greater than 2 ⋅ 105.

Sample tests

No. Input file (input.txt) Output file (output.txt)
1
10 12 10 12 10 12 10 12 10 12 10 12
1
2
3
6
2
10 12 10 12 10 12 10 10 10 12 10 12
1

0.105s 0.015s 13