#C4952. Merging Magical Stones

    ID: 48547 Type: Default 1000ms 256MiB

Merging Magical Stones

Merging Magical Stones

You are given n magical stones, each with a positive integer magic power. You can perform any number of merge operations. During a merge operation, you can combine two stones into one, and their magical powers interact in a way that is governed by the greatest common divisor (GCD) function. In fact, if you merge two stones with powers \(a\) and \(b\), their new effective power becomes \(\gcd(a,b)\).

Your task is to determine the minimum number of distinct types of stones that can exist after performing any number of merge operations. It can be shown that regardless of the initial configuration, under the allowed operations, the answer is always 1 for any valid collection of stones.

Note: The \(\gcd\) here refers to the greatest common divisor, defined by the classical Euclid's algorithm.

inputFormat

The input is given from standard input (stdin) and consists of two lines:

  1. The first line contains a single integer \(n\) (\(1 \le n \le 10^5\)), the number of magical stones.
  2. The second line contains \(n\) space-separated positive integers representing the magic powers of the stones.

outputFormat

Output a single integer representing the minimum number of distinct types of stones achievable after performing the merge operations. According to the problem, the output will always be 1.

## sample
1
7
1