import math
def main():

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

    A = [v for v in A if v != 1]
    if len(set(A)) < len(A): return "not coprime"
    A = list(set(A))

    def searchPrimeNum(N):
        max = int(math.sqrt(N))
        seachList = [i for i in range(2,N+1)]
        primes = []
        while seachList[0] <= max:
            primes.append(seachList[0])
            tmp = seachList[0]
            seachList = [i for i in seachList if i % tmp != 0]
        primes.extend(seachList)
        return primes

    primes = searchPrimeNum(max(A))
    # print(primes)

    d = dict()
    ispair = True
    isset = True

    for v in A:
        for p in primes:
            if p <= v:
                if v % p == 0:
                    d[p] = d.get(p, 0) + 1
            else:
                break
    if any(d[p] > 1 for p in d):
        ispair = False
    if any(d[p] == N for p in d):
        isset = False

    if ispair:
        return "pairwise coprime"
    if isset:
        return "setwise coprime"

    return "not coprime"

if __name__ == '__main__':
    print(main())