MAX_A = 10**6 + 1
MAX_P = MAX_A // 2
is_prim = [i%2==1 for i in range(MAX_P)]
is_prim[1] = False; is_prim[2] = True
for i in range(3, MAX_P):
    if not is_prim[i]: continue
    for j in range(i+i, MAX_P, i): is_prim[j] = False

def solve():
    c = 0
    C = [0] * MAX_A
    for a in A:
        # for p in [i for i in range(MAX_P) if is_prim[i] and a%i==0]:
        for p, f in zip(range(MAX_P), is_prim):
            if not f: continue
            if a%p: continue
            C[p] += 1
            c = max(c, C[p])
    if c <= 1: return "pairwise"
    elif c <= n-1: return "setwise"
    return "not"

n = int(input())
A = [*map(int, input().split())]
print(solve(), 'coprime')
