import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


n = int(input())
a = list(map(int, input().split()))
def hurui(n):
    """n以下の素数のリストを返す
    """
    l = list(range(2,n+1))
    p = 2
    i = 0
    while True:
        l = [item for item in l if item==p or item%p!=0]
        i += 1
        p = l[i]
        if p*p>n:
            break
    return l
l = hurui(max(a)+1)
b = [[0]*len(l) for _ in range(n)]
def gcd(a, b):
    while b:
        a, b = b, a%b
    return a

for i in range(n):
    for j in range(len(l)):
        val = a[i]
        v = 0
        while val%l[j]==0:
            val //= l[j]
            v += 1
        b[i][j] = v
done = False
for j in range(len(l)):
    if sum((b[i][j]>0) for i in range(n))>=2:
        g = a[0]
        for i in range(1,n):
            g = gcd(g, a[i])
            if g==1:
                print("setwise coprime")
                done = True
                break
        else:
            print("not coprime")
            done = True
    if done:
        break
else:
    print("pairwise coprime")