Math Is Too Easy

Time limit1sMemory limit128 MB

Problem

Sanggeun's grandmother is a famous mathematician. Every day she gives Sanggeun a math problem. This time she writes one positive integer on each of N sheets of paper and gives them to him.

Sanggeun may repeat the following move any number of times.

  • Choose two numbers A and B.
  • Choose a prime number X that divides A.
  • Replace A with A/X, and replace B with B×X.

Grandmother's score is the greatest common divisor of all numbers currently written on the papers. Find the largest score Sanggeun can obtain, and the minimum number of moves needed to obtain that score.

Input

The first line contains an integer N. (1 ≤ N ≤ 100)

The second line contains N positive integers written on the papers. Each number is at most 1,000,000.

Output

Print two integers: the largest score Sanggeun can obtain and the minimum number of moves needed to obtain it.