import math, sys
input = sys.stdin.readline
n = int(input())
a = list(map(int, input().split()))

def prime(n):
    p = []
    flag = [True] * (n - 1)
    for i in range(n - 1):
        if flag[i] == True:
            p.append(i + 2)
            num = i
            while num <= n - 2:
                flag[num] = False
                num += i + 2
    return p

gcd = 0
for i in range(n):
    gcd = math.gcd(gcd, a[i])
if gcd != 1:
    print("not coprime")
else:
    p = prime(997)
    flag = True
    a2 = []
    for i in p:
        temp = 0
        for j in a:
            if j % i == 0:
                temp += 1
            if temp == 2:
                flag = False
                break
            while j % i == 0:
                j //= i
            a2.append(j)
        if flag == False:
            break
    if flag == False:
        print("setwise coprime")
    else:
        num = set()
        for i in a2:
            if i == 1:
                continue
            if i in num:
                print("setwise coprime")
                break
            else:
                num.add(i)
        else:
            print("pairwise coprime")