from math import sqrt, gcd
def factoring(k): #kを因数分解し、素因数とその個数を辞書に入れて返す。
    dic = dict()
    n = int(sqrt(k))+2
    for i in range(2, n):
        count = 0
        while k%i == 0:
            count += 1
            k = k//i
        if count != 0:
            dic[i] = count
    if k != 1: #sqrt(k)までチェックしてもkが1になっていない --> kが素因数
        dic[k] = 1
    return dic

N = int(input())
A = list(map(int, input().split()))


from collections import defaultdict


dic = defaultdict(int)

if N <= 10 ** 5:
    count = 0
    for a in A:
        tmp = factoring(a)
        for i in tmp:
            dic[i] = max(tmp[i], dic[i])
            count += tmp[i]

    tmp = 0
    for i in dic:
        tmp += dic[i]

    if count == tmp:
        print ('pairwise coprime')
        exit()

GCD = A[0]
for a in A:
    GCD = gcd(GCD, a)
    if GCD == 1:
        break

if GCD == 1:
    print ('setwise coprime')
else:
    print ('not coprime')

