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:
    #print(aa)
    x=gcd(aa[-1],aa[-2])
    if n>2:
        #print(aa[:n-2])
        for i in range(len(aa)-2):
            x=gcd(x,aa[:n-2][-1-i])
            #print(x)
        if x!=1:
            print("not coprime")
            sys.exit()
    else:
        if x!=1:
            print("not coprime")
            sys.exit()
    print("setwise coprime")
