#abc177 e
import sys,math,collections,itertools
input = sys.stdin.readline


N=int(input())
A=list(map(int,input().split()))
num = [0]*(10**6+1)

fact = [0]*(10**6+1)
fact[1]=1

mn = 1
for a in A:
    if a != 1:
        flag = 0
        temp = a
        for i in range(2, int(-(-a**0.5//1))+1):
            if temp%i==0:
                while temp%i==0:
                    temp //= i
                flag = 1
                fact[i]+=1
                mn = max(mn,fact[i])
        if temp!=1:
            fact[temp]+=1
            mn = max(mn,fact[i])
            flag = 1
        if flag==0:
            fact[n]+=1
            mn = max(mn,fact[i])

if mn == 1:
    print('pairwise coprime')
elif mn ==N:
    print('not coprime')
else:
    print('setwise coprime')
