eolymp
bolt
Try our new interface for solving problems
Problems

Astronomy

Astronomy

prb1185 There are n planets in the planetary system of star X. They orbit star X in circular orbits located in the same plane. Their tangent velocities are constant. Directions of orbiting of all planets are the same. Sometimes the event happens in this planetary system which is called planet parade. It is the moment when all planets and star X are located on the same straight line. Your task is to find the length of the time interval between two consecutive planet parades.

Input

The first line contains the number of planets n (2n1000).

Second line contains n integers ti (1ti10000) - the orbiting periods of planets. Not all of ti are the same.

Output

Print the answer as a common irreducible fraction, separate numerator and denominator by a space.

Time limit 1 second
Memory limit 64 MiB
Input example #1
3
6 2 3
Output example #1
3 1
Source 2005 ACM NEERC Northern Subregion, Problem A