import math
def main():

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


    isprime = [True] * (1 + pow(10, 6))
    prime = []
    SPF = [None] *  (1 + pow(10, 6))
    def manipulated_seive(N):
        isprime[0] = isprime[1] = False
        for i in range(2, N):
            if isprime[i] == True:
                prime.append(i)
                SPF[i] = i
            j = 0
            while (j < len(prime) and i * prime[j] < N and prime[j] <= SPF[i]):

                isprime[i * prime[j]] = False
                SPF[i * prime[j]] = prime[j]

                j += 1
        return

    manipulated_seive(max(A))
    prime = set(prime)

    d = dict()
    ispair = True
    isset = True

    for v in A:
        for p in prime:
            if p <= v:
                if v % p == 0:
                    d[p] = d.get(p, 0) + 1
                    u = v // p
            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())