Beautiful Numbers
School No. 1331 in Uzhlia is famous for its students' exceptional mathematical skills, largely due to the extracurricular classes taught by the renowned teacher, Anton Andriyovych.
Today, Anton Andriyovych introduced his students to numbers he believes have intriguing properties, which he calls beautiful numbers. A number is considered beautiful if there is no integer greater than one whose square divides it evenly. For instance, 12 is not beautiful because it is divisible by 4, the square of 2. However, 13 and 14 are beautiful numbers.
The students are adept at mental calculations, so their initial task was to determine if a given number is beautiful.
Marisia, the top student, quickly solved this problem. To challenge her further, the teacher wrote N numbers on the board and tasked her with determining whether the product of these numbers is a beautiful number. Marisia soon found the answer but wants to verify it. She asks you to create a program that checks if the product of these numbers is beautiful. If it is not, she needs to know any number greater than one whose square divides the product.
**Input format:** The first line contains the integer N (1 ≤ N ≤ 100), representing the number of numbers written on the board. The second line contains N natural numbers. Each number does not exceed (10^18).
**Output format:** If the product is beautiful, output "Beautiful" on a single line. Otherwise, output any number greater than one whose square divides the product of the N numbers.
**Explanation of examples:**
First example: The product 5*6*7 equals 210. There is no integer greater than one whose square divides 210 evenly, so 210 is a beautiful number.
Second example: The product 35*12 equals 420. The number 420 is divisible by 4, which is the square of 2.
**Scoring:**
- If A_1 * A_2 * ... * A_N ≤ 10^6, you earn at least 20 points. - If A_1 * A_2 * ... * A_N ≤ 10^12, you earn at least 40 points. - For all i, if A_i ≤ 10^12, you earn at least 60 points.