from math import gcd

N = int(input())
A = list(map(int, input().split()))

def isSetwise(A):
    ret = A[0]
    for a in A:
        ret = gcd(ret, a)
    return ret == 1

def isPairwise(A):
    A.sort()
    mx = max(A)
    V = set()

    for a in A:
        if a in V:
            return False
        n = a
        while n < mx:
            V.add(n)
            n += a
    return True

if not isSetwise(A):
    print('not coprime')
    exit()

if isPairwise(A):
    print('pairwise coprime')
else:
    print('setwise coprime')
