import math
n=int(input())
l=list(map(int,input().split()))
num=math.gcd(l[0],l[1])
for i in l:
    num=math.gcd(num,i)
if num!=1:
    print('not coprime')
else:
    ll=set(l)
    n=len(ll)
    if n>=8*10**4:
        print('setwise coprime')
    else:
        flag=True
        ll=list(ll)
        for i in range(n-1):
            for j in range(i+1,n):
                if math.gcd(ll[i],ll[j])!=1:
                    flag=False
                    break
        if flag==True:
            print('pairwise coprime')
        else:
            print('setwise coprime')