import sys
import resource

sys.setrecursionlimit(100000)

n=int(input())
a=list(map(int,input().split()))
t=1

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

flag=0
for i in a:
    if gcd(t,i)!=1:
        flag=1
    t*=i
if not flag:
    print("pairwise coprime")
    exit()

t=a[0]
for i in a:
    t=gcd(t,i)
if t==1: print("setwise coprime")
else: print("not coprime")