import copy
from collections import defaultdict

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

def fast_prime_factrization(A):
    maxA = max(A)
    print(maxA)
    D = [-1]*(maxA+1)
    for i in range(2,maxA+1):
        print(i)
        for j in range(1,maxA+1):
            if i*j > maxA:
                break
            if D[i*j] == -1:
                D[i*j] = i
    pr_facts = [defaultdict(int) for i in range(len(A))]
    for i,a in enumerate(A):
        X = a
        while 1:
            if X == D[X]:
                pr_facts[i][D[X]] += 1
                break
            else:
                pr_facts[i][D[X]] += 1
                X //= D[X]
    print(D)
    print(pr_facts)
    return pr_facts

def check_sc():
    scs = set([i for i in range(1,A[0]+1)])
    for a in A:
        now = copy.copy(scs)
        for sc in now:
            if a % sc != 0:
                scs.remove(sc)
    
    scs = list(scs)
    return (len(scs) == 1)

def check_pc():
    pr_facts = fast_prime_factrization(A)
    maxA = max(A)
    d = [False]*(maxA+1)
    ret = True
    for i in range(len(pr_facts)):
        for key in pr_facts[i].keys():
            if d[key]:
                ret = False
                break
            d[key] = True
        else:
            continue
        break
    return ret
                
pc = check_pc()
sc = check_sc()

if pc:
    print("pairwise coprime")
elif sc:
    print("setwise coprime")
else:
    print("not coprime")












