import bisect

import math



n = int(eval(input()))

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

As.sort()



cons = 10 ** 6

is_prime = [True] * (cons + 1)

is_prime[0] = False

is_prime[1] = False

for i in range(2, int(cons**0.5) + 1):

    if not is_prime[i]:

        continue

    for j in range(i * 2, cons + 1, i):

        is_prime[j] = False

Ps = [i for i in range(cons + 1) if is_prime[i]]

# def eratosthenes(n):

#     is_prime = [0, 0] + [1] * (n - 1)

#     for i in range(int(n**0.5) + 1):

#         if is_prime[i] == 0:

#             continue

#         for j in range(i * 2, n + 1, i):

#             is_prime[j] = 0

#     return [i for i, pi in enumerate(is_prime) if pi == 1]

# Ps = eratosthenes(10 ** 6)



def factorize(n):

    primes = set()

    for p in Ps:

        if p * p > n:

            break

        while n % p == 0:

            n //= p

            primes.add(p)

    if n > 1:

        primes.add(n)

    return primes



gcd = As[0]

for a in As:

  gcd = math.gcd(gcd, a)

setwiseFlag = (gcd == 1)



pairwiseFlag = True

target = set()

for a in As:

  primes = factorize(a)

  if len(primes & target) > 0:

    pairwiseFlag = False

  target |= primes



if pairwiseFlag:

  print('pairwise coprime')

elif setwiseFlag:

  print('setwise coprime')

else:

  print('not coprime')

import math



def primes(n):

    is_prime = [True] * (n + 1)

    is_prime[0] = False

    is_prime[1] = False

    for i in range(2, int(n**0.5) + 1):

        if not is_prime[i]:

            continue

        for j in range(i * 2, n + 1, i):

            is_prime[j] = False

    return [i for i in range(n + 1) if is_prime[i]]



def factorize(n):

    primes = set()

    for p in Ps:

        if p * p > n:

            break

        while n % p == 0:

            n //= p

            primes.add(p)

    if n > 1:

        primes.add(n)

    return primes



Ps = primes(10 ** 6)

n = int(eval(input()))

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



# setwiseFlag

gcd = As[0]

for a in As:

  gcd = math.gcd(gcd, a)

setwiseFlag = (gcd == 1)



# pairwiseFlag

pairwiseFlag = True

target = set()

for a in As:

  primes = factorize(a)

  if len(primes & target) > 0:

    pairwiseFlag = False

  target |= primes



if pairwiseFlag:

  print('pairwise coprime')

elif setwiseFlag:

  print('setwise coprime')

else:

  print('not coprime')

import bisect
import math

n = int(eval(input()))
As = list(map(int, input().split()))
As.sort()
cons = 10**6
is_prime = [True] * (cons + 1)
is_prime[0] = False
is_prime[1] = False
for i in range(2, int(cons**0.5) + 1):
    if not is_prime[i]:
        continue
    for j in range(i * 2, cons + 1, i):
        is_prime[j] = False
Ps = [i for i in range(cons + 1) if is_prime[i]]
# def eratosthenes(n):
#     is_prime = [0, 0] + [1] * (n - 1)
#     for i in range(int(n**0.5) + 1):
#         if is_prime[i] == 0:
#             continue
#         for j in range(i * 2, n + 1, i):
#             is_prime[j] = 0
#     return [i for i, pi in enumerate(is_prime) if pi == 1]
# Ps = eratosthenes(10 ** 6)
def factorize(n):
    primes = set()
    for p in Ps:
        if p * p > n:
            break
        while n % p == 0:
            n //= p
            primes.add(p)
    if n > 1:
        primes.add(n)
    return primes


gcd = As[0]
for a in As:
    gcd = math.gcd(gcd, a)
setwiseFlag = gcd == 1
pairwiseFlag = True
target = set()
for a in As:
    primes = factorize(a)
    if len(primes & target) > 0:
        pairwiseFlag = False
    target |= primes
if pairwiseFlag:
    print("pairwise coprime")
elif setwiseFlag:
    print("setwise coprime")
else:
    print("not coprime")

import math


def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]


def factorize(n):
    primes = set()
    for p in Ps:
        if p * p > n:
            break
        while n % p == 0:
            n //= p
            primes.add(p)
    if n > 1:
        primes.add(n)
    return primes


Ps = primes(10**6)
n = int(eval(input()))
As = list(map(int, input().split()))
# setwiseFlag
gcd = As[0]
for a in As:
    gcd = math.gcd(gcd, a)
setwiseFlag = gcd == 1
# pairwiseFlag
pairwiseFlag = True
target = set()
for a in As:
    primes = factorize(a)
    if len(primes & target) > 0:
        pairwiseFlag = False
    target |= primes
if pairwiseFlag:
    print("pairwise coprime")
elif setwiseFlag:
    print("setwise coprime")
else:
    print("not coprime")

-import bisect -n = int(eval(input())) -As = list(map(int, input().split())) -As.sort() -cons = 10**6 -is_prime = [True] * (cons + 1) -is_prime[0] = False -is_prime[1] = False -for i in range(2, int(cons**0.5) + 1): -    if not is_prime[i]: -        continue -    for j in range(i * 2, cons + 1, i): -        is_prime[j] = False -Ps = [i for i in range(cons + 1) if is_prime[i]] -# def eratosthenes(n): -#     is_prime = [0, 0] + [1] * (n - 1) -#     for i in range(int(n**0.5) + 1): -#         if is_prime[i] == 0: -#             continue -#         for j in range(i * 2, n + 1, i): -#             is_prime[j] = 0 -#     return [i for i, pi in enumerate(is_prime) if pi == 1] -# Ps = eratosthenes(10 ** 6) + +def primes(n): +    is_prime = [True] * (n + 1) +    is_prime[0] = False +    is_prime[1] = False +    for i in range(2, int(n**0.5) + 1): +        if not is_prime[i]: +            continue +        for j in range(i * 2, n + 1, i): +            is_prime[j] = False +    return [i for i in range(n + 1) if is_prime[i]] + + +Ps = primes(10**6) +n = int(eval(input())) +As = list(map(int, input().split())) +# setwiseFlag +# pairwiseFlag