import sys
import resource
from collections import defaultdict

s=set()
sys.setrecursionlimit(100000)

def gcd(a,b):
    if a%b==0: return b
    return gcd(b,a%b)

i,k=2,10**6
pri=set()
while k>=i*i:
    while k%i==0:
        k//=i
        pri.add(i)
    i+=1
if k!=1: pri.add(k)

n=int(input())
a=list(map(int,input().split()))
visi=set()
s=a[0]
flag=1
for i in a:
    s=gcd(s,i)
    for c in pri:
        if i%c==0:
            if c in visi:
                flag=0
                break
            visi.add(c)
if flag: print("pairwise coprime")
elif s==1: print("setwise coprime")
else: print("not coprime")