N = int(input())
A = list(map(int, input().split()))

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append(i)

    if temp!=1:
        arr.append(temp)

    if arr==[]:
        arr.append(n)

    return arr

def main():
    pairwise = True
    setwise = True
    reg = set(factorization(A[0]))
    common = set(reg)
    for a in A[1:]:
        new_reg = []
        for r in reg:
            if a % r == 0:
                pairwise = False
                if not setwise:
                    return 'not coprime'
                a = a // r
                new_reg.append(r)
        new_reg.extend(factorization(a))
        new_reg = set(new_reg)
        reg = reg | new_reg
        common = common & new_reg
    if pairwise:
        return 'pairwise coprime'
    elif len(common) == 0:
        return 'setwise coprime'
    else:
        return 'not coprime'

print(main())
