import math
import functools

N = int(input())
A = [int(_) for _ in input().split()]
p = set([])

A.sort()

pairwise = True
for a in A:
    # print(a)
    if a == 1:
        continue
    if pairwise is False:
        break
    for k in range(2, int(math.sqrt(a) + 1)):
        if a % k == 0:
            if k in p:
                pairwise = False
                break
            p.add(k)
            while a % k == 0:
                a //= k
    if pairwise and a > 1:
        p.add(a)
    # print(p)

y = functools.reduce(math.gcd, A)

if pairwise:
    print("pairwise coprime")
elif y == 1:
    print("setwize coprime")
else:
    print("not coprime")

