import sys
input = sys.stdin.readline

#n = int(input())
#l = list(map(int, input().split()))

'''
a=[]
b=[]
for i in range():
    A, B = map(int, input().split())
    a.append(A)   
    b.append(B)'''
from math import gcd
n=int(input())
a=list(map(int,input().split()))

aa=[]
c=0
for i in range(n-1):
    aa.append(gcd(a[i],a[i+1]))
    if aa[i]==1:
        c+=1
if c==n-1:
    print("pairwise coprime")
    sys.exit()

else:
    x=gcd(a[0],a[1])
    if n>=4:
        for i in range(2,n-1):
            #print(gcd(x,a[i]))
            x=gcd(x,a[i])
            if x!=1:
                print("not coprime")
                sys.exit()
    else:
        if n==3:
            if gcd(x,a[2])!=1:
                print("not coprime")
                sys.exit()
        else:
            if x!=1:
                print("not coprime")
                sys.exit()
    print("setwise coprime")
