import math
from functools import reduce
n=int(input())
a=list(map(int,input().split()))
arr = [0]*(10**6+1)
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            while temp%i==0:
                temp //= i
            arr.append(i)

    if temp!=1:
        arr.append(temp)

    if arr==[]:
        arr.append(n)

    return arr
for num in a:
    if num==1:arr[1]+=1
    else:
        for s in factorization(num):
            arr[s]+=1
gcd=reduce(math.gcd,a)
ans=max(arr)
if ans==1 or ans==arr[1]:
    print("pairwise coprime")
else:

    if gcd==1:
        print("setwise coprime")
    else:
        print("not coprime")

