from math import gcd
N = int(input())
A = sorted([int(i) for i in input().split()])
def factorization(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 [a[0] for a in arr]
all_flag = True
devisors = set()
for n in range(N-1):
    if n == 0:
        g = gcd(A[n],A[n+1])
    else:
        g = gcd(A[n+1],g)
    temp = factorization(A[n])
    for t in temp:
        if t in devisors:
            all_flag=False
        else:
            devisors.add(t)
if all_flag and g == 1:
    print('pairwise coprime')
elif g==1:
    print('setwise coprime')
else:
    print('not coprime')