import sys

INF = 1 << 60

MOD = 10**9 + 7 # 998244353

sys.setrecursionlimit(2147483647)

input = lambda:sys.stdin.readline().rstrip()

from math import gcd

from functools import reduce

def resolve():

    n = int(eval(input()))

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



    if reduce(gcd, A) != 1:

        print("not coprime")

        return



    M = max(A)

    dist = [0] * (M + 1)

    for a in A:

        dist[a] += 1



    for d in range(2, M + 1):

        c = sum(dist[i] for i in range(d, M + 1, d))

        if c >= 2:

            print("setwise coprime")

            return



    print("pairwise coprime")

resolve()
import sys

INF = 1 << 60

MOD = 10**9 + 7 # 998244353

sys.setrecursionlimit(2147483647)

input = lambda:sys.stdin.readline().rstrip()

from math import gcd

from functools import reduce

def resolve():

    n = int(eval(input()))

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



    if reduce(gcd, A) != 1:

        print("not coprime")

        return



    M = max(A)

    dist = [0] * (M + 1)

    for a in A:

        dist[a] += 1



    sieve = [True] * (M + 1)

    for p in range(2, M + 1):

        if not sieve[p]:

            continue

        c = 0

        for i in range(p, M + 1, p):

            c += dist[i]

            sieve[i] = False

        if c >= 2:

            print("setwise coprime")

            return



    print("pairwise coprime")

resolve()
import sys

INF = 1 << 60
MOD = 10**9 + 7  # 998244353
sys.setrecursionlimit(2147483647)
input = lambda: sys.stdin.readline().rstrip()
from math import gcd
from functools import reduce


def resolve():
    n = int(eval(input()))
    A = list(map(int, input().split()))
    if reduce(gcd, A) != 1:
        print("not coprime")
        return
    M = max(A)
    dist = [0] * (M + 1)
    for a in A:
        dist[a] += 1
    for d in range(2, M + 1):
        c = sum(dist[i] for i in range(d, M + 1, d))
        if c >= 2:
            print("setwise coprime")
            return
    print("pairwise coprime")


resolve()

import sys

INF = 1 << 60
MOD = 10**9 + 7  # 998244353
sys.setrecursionlimit(2147483647)
input = lambda: sys.stdin.readline().rstrip()
from math import gcd
from functools import reduce


def resolve():
    n = int(eval(input()))
    A = list(map(int, input().split()))
    if reduce(gcd, A) != 1:
        print("not coprime")
        return
    M = max(A)
    dist = [0] * (M + 1)
    for a in A:
        dist[a] += 1
    sieve = [True] * (M + 1)
    for p in range(2, M + 1):
        if not sieve[p]:
            continue
        c = 0
        for i in range(p, M + 1, p):
            c += dist[i]
            sieve[i] = False
        if c >= 2:
            print("setwise coprime")
            return
    print("pairwise coprime")


resolve()

-    for d in range(2, M + 1): -        c = sum(dist[i] for i in range(d, M + 1, d)) +    sieve = [True] * (M + 1) +    for p in range(2, M + 1): +        if not sieve[p]: +            continue +        c = 0 +        for i in range(p, M + 1, p): +            c += dist[i] +            sieve[i] = False