import math
import sys
n=int(input())
a=list(map(int,input().split()))
ans=a[0]
a=sorted(a)
flag=0
for i in range(len(a))[::-1]:
    for j in range(len(a)):
        if math.gcd(a[i],a[j])!=1 and i!=j:
            flag=1
            break
    if flag==1:
        break
    if i==0:
        print("pairwise coprime")
        sys.exit()
for i in range(1,len(a)):
    ans=math.gcd(ans,a[i])
    if ans==1:
        print("setwize coprime")
        sys.exit()
print("not coprime")
