from collections import Counter


def gcd(a, b):
    if a < b:
        a, b = b, a
    c = 1
    while c != 0:
        c = a % b
        a = b
        b = c
    return a


numbers = [[] for i in range(10**6 + 1)]
flag = [True for i in range(10**6 + 1)]
for i in range(2, 10**3 + 1):
    if flag[i]:
        for j in range(2, 10**6 + 1):
            if i * j > 10**6:
                break
            flag[i * j] = False
            numbers[i * j].append(i)
N = int(input())
alist = list(map(int, input().split()))
adict = {}
flag = False
for a in alist:
    temp = numbers[a]
    if temp == []:
        temp = [a]
    for i in temp:
        if i not in adict:
            adict[i] = 0
        else:
            flag = True
            break
    if flag:
        break

if not flag:
    print("pairwise coprime")
    exit(0)

temp = gcd(alist[0], alist[1])
for a in alist[2:]:
    temp = gcd(temp, a)
    if temp == 1:
        print("setwise coprime")
        exit(0)

print("not coprime")