AT_abc390_b [ABC390B] Geometric Sequence
Description
You are given a length- $ N $ sequence $ A=(A_1,A_2,\ldots,A_N) $ of positive integers.
Determine whether $ A $ is a geometric progression.
Input Format
The input is given from Standard Input in the following format:
> $ N $ $ A_1 $ $ A_2 $ $ \ldots $ $ A_N $
Output Format
If $ A $ is a geometric progression, print `Yes`; otherwise, print `No`.
Explanation/Hint
### Sample Explanation 1
$ A=(3,6,12,24,48) $ .
$ A $ is a geometric progression with first term $ 3 $ , common ratio $ 2 $ , and five terms.
Therefore, print `Yes`.
### Sample Explanation 2
$ A=(1,2,3) $ .
Since $ A_1 : A_2 = 1 : 2 \neq 2 : 3 = A_2 : A_3 $ , $ A $ is not a geometric progression.
Therefore, print `No`.
### Sample Explanation 3
$ A $ is a geometric progression with first term $ 10 $ , common ratio $ 0.8 $ , and two terms.
Therefore, print `Yes`.
### Constraints
- $ 2 \leq N \leq 100 $
- $ 1 \leq A_i \leq 10^9 $
- All input values are integers.