# Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Once upon a time, there lived a man called Mahi the mathematician. He was banned from his kingdom because of his stupid theories. He moved to another kingdom and started his own shop. As usual, he came up with another stupid theory. Every month he buys N goods for his shop. All the goods have a specific profit A_{1},A_{2}, A_{3}……A_{n}
.He pays exactly one good to the kingdom as tax so that the gcd of the
profits of the remaining goods are maximized.
And surprisingly enough, his theory starts to work this time as he begins to profit
more. You want to apply his theory to your shop to increase your profit. You also
want to know how many ways you can achieve maximum gcd.
**N.B.** gcd or greatest common divisor of two or more integers, which are not all zero,
is the largest positive integer that divides each of the integers. For example, the gcd
of 12 and 16 is 4.

First line will contain an integer N(1< N ≤ 10^{5}). The next line will contain N space
separated integers A_{1}, A_{2}, A_{3}, …, A_{n} (1≤ A_{i}≤10^{12}).

Print two space separated integers-the maximum possible gcd of the remaining profits and number of ways to achieve maximum gcd.

Input | Output |
---|---|

4 7 7 7 7 | 7 4 |

Input | Output |
---|---|

2 1 2 | 2 1 |