from math import gcd
def g(a):
    al=len(a)
    if al==2:
        return gcd(a[0],a[1])
    elif al==1:
        return a[0]
    return gcd(g(a[:al//2]),g(a[al//2:]))
n=int(input())
a=list(map(int,input().split()))
if g(a)!=1:
    print("not coprime")
    exit()
one=a.count(1)
if len(a)-one>168:
    print("setwise coprime")
    exit()
a=[i for i in a if i!=1]
for i in range(len(a)-1):
    for j in range(i+1,len(a)):
        if gcd(a[i],a[j])!=1:
            print("setwise coprime")
            exit()
print("pairwise coprime")