mod=10**9+7
import math
N=int(input())
A=list(map(int,input().split()))
ans=['pairwise coprime','setwise coprime','not coprime']
k=0
s,g=A[-1],A[-1]
for i in range(2,N+1):
    g=math.gcd(g,A[-i])
    if math.gcd(s,A[-i])!=1:
        k=-1
    s*=A[-i]
    s%=mod
if k==-1:
    if g==1:
        k=1
    else:
        k=2
print(ans[k])