from math import *
import fractions
import sys
import collections
import itertools
import pprint
from collections import deque
from heapq import *
import copy
input=sys.stdin.readline
N=int(input())
A=list(map(int,input().split()))
n = 10**6
d={}
pairflag=1
setflag=0
#primes = set(range(2, n+1))
#for i in range(2, int(n**0.5+1)):
#    primes.difference_update(range(i*2, n+1, i))
#primes=list(primes)
#print(len(primes))
buf=[0]*(max(A)+10)
seen=[0]*(max(A)+10)
def ggcd(a,b):
    if(b==0):
        return a
    return ggcd(b,a%b)
for num in range(N):
    m=A[num]
    #print(m)
    for i in range(2, int(sqrt(m)) +1):
        while m%i==0:
            if seen[i]==0:
                buf[i]=1
                m //= i
            else:
                pairflag=0
                break
        if pairflag==0:
            break
    if pairflag==1:
        if m>1:
            if seen[m]==0:
                buf[m]=1
            else:
                pairflag=0
                break
    else:
        break
    #    if pairflag==0:
    #        break
    seen=buf[:]
    #print(m,seen,buf,pairflag)
#print(pairflag)

num=A[0]
for i in range(1,N):
    num=ggcd(num,A[i])
if num==1:
    setflag=1
else:
    setflag=0

if pairflag==1:
    print("pairwise coprime")
elif setflag==1:
    print("setwise coprime")
else:
    print("not coprime")

"""
x=list(set(A))
for i in x:
    for j in range(2*i,10**6+1,i):
        if d.get(j)!=None:
            pairflag=0
            break
    if pairflag==0:
        break
print(pairflag)

"""