100 atcoder#ABC177E. [ABC177E] Coprime
[ABC177E] Coprime
Score : points
Problem Statement
We have integers. The -th number is .
is said to be pairwise coprime when holds for every pair such that .
is said to be setwise coprime when is not pairwise coprime but .
Determine if is pairwise coprime, setwise coprime, or neither.
Here, denotes greatest common divisor.
Constraints
Input
Input is given from Standard Input in the following format:
Output
If is pairwise coprime, print pairwise coprime
; if is setwise coprime, print setwise coprime
; if neither, print not coprime
.
3
3 4 5
pairwise coprime
, so they are pairwise coprime.
3
6 10 15
setwise coprime
Since , they are not pairwise coprime. However, since , they are setwise coprime.
3
6 10 16
not coprime
, so they are neither pairwise coprime nor setwise coprime.