N = int(input())
A = [int(d) for d in input().split()]

A_max = max(A)

p = [True] * (A_max + 1)
c = [0] * (A_max + 1)

pair = True

for i in range(2, A_max + 1):
    if p[i]:
        for j in range(i*2, A_max+1, i):
            p[j] = False
        for a in A:
            if a%i == 0:
                c[i] += 1
        if c[i] >= 2:
            pair = False
            break


if pair:
    print("pairwise coprime")
else:
    import math
    from functools import reduce
    g = reduce(lambda x, y: math.gcd(x, y), A)
    if g == 1:
        print("setwise coprime")
    else:
        print("not coprime")


