import math
n=int(input())
a=list(map(int,input().split()))
def s_bunkai(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])
    if arr==[]:
        arr.append([n, 1])
    return arr
num1=a[0]
for i in range(1,n):
    num1=math.gcd(num1,a[i])
cnt=0
num3=set()
yn=0
for i in range(n):
    num2=s_bunkai(a[i])
    cnt+=len(num2)
    for j in range(len(num2)):
        num3.add(num2[j][0])
    if cnt!=len(num3):
        yn=1
        break
if yn==0:
    print("pairwise coprime")
elif num1==1:
    print("setwise coprime")
else:
    print("not coprime")
