import math
from collections import deque
Answer = 'not coprime'
N = int(input())
Alist = list(map(int,input().split()))
sign = math.gcd(Alist[0],Alist[1])
for i in range(1,N):
    sign = math.gcd(sign,Alist[i])
if sign == 1:
    Answer = 'setwise coprime'
Aset = set()
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])

    return arr
Alist = deque(Alist)
sig =1
if Answer == 'setwise coprime':
    for _ in range(len(Alist)):
        if sig ==0:
            break
        A = Alist.popleft()
        An =  factorization(A)
        for i in range(len(An)):
            if An[i][0] not in Aset:
                Aset.add(An[i][0])
            else:
                sig = 0
    if len(Alist) == 0 and sig == 1:
        Answer = 'pairwise corprime'
print(Answer)
