from math import gcd
from collections import defaultdict
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])
    if arr==[]:
        arr.append([n, 1])
    arr = [a[0] for a in arr]
    if a = [1]:
        return []
    else:
        return arr

N = int(input())
A = [int(i) for i in input().split()]
dict_A = defaultdict(int)
dep_flag = False
for a in A:
    dict_A[a] += 1
    if a != 1 and dict_A[a] >= 2:
        dep_flag=True
coprime = True
divisors = set()
for a,i in enumerate(dict_A.keys()):
    if i == 0:
        g = a
    else:
        g = gcd(g,a)
    temp = factorization(a)
    if coprime:
        for t in temp:
            if t in divisors:
                coprime = False
            else:
                divisors.add(t)
if g==1 and coprime and dep_flag == False:
    print('pairwise coprime')
elif g==1 and dep_flag==False:
    print('setwise coprime')
else:
    print('not coprime')

    