import math

NOTCOM = "not coprime"

SETWISE = "setwise coprime"

PAIRWISE = "pairwise coprime"



def calc_prime(N):

    prime, i = set(), 1

    while i * i <= N:

        if N % i == 0:

            yield i

            if i != N//i: yield N//i

        i += 1



def main():

    N = int(eval(input()))

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

    A = list(set(A))

    cnt2 = 0

    cnt3 = 0

    allgcd = A[0]

    for a in A:

        allgcd = math.gcd(allgcd, a)

        if a % 2 == 0:

            cnt2 += 1

        if a % 3 == 0:

            cnt3 += 1

    if allgcd != 1:

        return NOTCOM

    

    if cnt2 >= 2 or cnt3 >= 2:

        return SETWISE



    allprime = set()

    for a in A:

        for t in calc_prime(a):

            if t in allprime and t != 1:

                return SETWISE

            allprime.add(t)

    return PAIRWISE



print((main()))

import math

NOTCOM = "not coprime"

SETWISE = "setwise coprime"

PAIRWISE = "pairwise coprime"

MAX_A = 10 ** 6 + 5



def main():

    N = int(eval(input()))

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

    c = [0] * MAX_A

    for a in A:

        c[a] += 1

    pairwse = True

    for i in range(2, MAX_A):

        cnt = 0

        for j in range(i, MAX_A, i):

            cnt += c[j]

        if cnt > 1: pairwse = False

    if pairwse:

        return PAIRWISE

    

    allgcd = A[0]

    for a in A:

        allgcd = math.gcd(allgcd, a)

    if allgcd == 1: return SETWISE

    return NOTCOM



print((main()))

import math

NOTCOM = "not coprime"
SETWISE = "setwise coprime"
PAIRWISE = "pairwise coprime"


def calc_prime(N):
    prime, i = set(), 1
    while i * i <= N:
        if N % i == 0:
            yield i
            if i != N // i:
                yield N // i
        i += 1


def main():
    N = int(eval(input()))
    A = list(map(int, input().split()))
    A = list(set(A))
    cnt2 = 0
    cnt3 = 0
    allgcd = A[0]
    for a in A:
        allgcd = math.gcd(allgcd, a)
        if a % 2 == 0:
            cnt2 += 1
        if a % 3 == 0:
            cnt3 += 1
    if allgcd != 1:
        return NOTCOM
    if cnt2 >= 2 or cnt3 >= 2:
        return SETWISE
    allprime = set()
    for a in A:
        for t in calc_prime(a):
            if t in allprime and t != 1:
                return SETWISE
            allprime.add(t)
    return PAIRWISE


print((main()))

import math

NOTCOM = "not coprime"
SETWISE = "setwise coprime"
PAIRWISE = "pairwise coprime"
MAX_A = 10**6 + 5


def main():
    N = int(eval(input()))
    A = list(map(int, input().split()))
    c = [0] * MAX_A
    for a in A:
        c[a] += 1
    pairwse = True
    for i in range(2, MAX_A):
        cnt = 0
        for j in range(i, MAX_A, i):
            cnt += c[j]
        if cnt > 1:
            pairwse = False
    if pairwse:
        return PAIRWISE
    allgcd = A[0]
    for a in A:
        allgcd = math.gcd(allgcd, a)
    if allgcd == 1:
        return SETWISE
    return NOTCOM


print((main()))

- - -def calc_prime(N): -    prime, i = set(), 1 -    while i * i <= N: -        if N % i == 0: -            yield i -            if i != N // i: -                yield N // i -        i += 1 +MAX_A = 10**6 + 5 -    A = list(set(A)) -    cnt2 = 0 -    cnt3 = 0 +    c = [0] * MAX_A +    for a in A: +        c[a] += 1 +    pairwse = True +    for i in range(2, MAX_A): +        cnt = 0 +        for j in range(i, MAX_A, i): +            cnt += c[j] +        if cnt > 1: +            pairwse = False +    if pairwse: +        return PAIRWISE -        if a % 2 == 0: -            cnt2 += 1 -        if a % 3 == 0: -            cnt3 += 1 -    if allgcd != 1: -        return NOTCOM -    if cnt2 >= 2 or cnt3 >= 2: +    if allgcd == 1: -    allprime = set() -    for a in A: -        for t in calc_prime(a): -            if t in allprime and t != 1: -                return SETWISE -            allprime.add(t) -    return PAIRWISE +    return NOTCOM