#!python3

import sys
iim = lambda: map(int, sys.stdin.readline().rstrip().split())

from math import gcd

def factor(n):
    ans = []
    i = 0
    while n & 1 == 0:
        n >>= 1
        i += 1

    if i > 0:
        ans.append((2, i))

    for i in range(3, int(n**.5) +1, 2):
        x, y = divmod(n, i)

        if y == 0:
            j = 1
            x1 = x
            while True:
                x1, y = divmod(x, i)
                if y == 0:
                    x = x1
                    j += 1
                else:
                    ans.append((i, j))
                    break
            n = x

    if n > 1:
        ans.append((n, 1))

    return ans

def resolve():
    it = map(int, sys.stdin.read().split())
    N = next(it)
    A = list(it)
    A.sort()
    M = A[-1]
    M1 = M + 1

    dp = [0] * M1

    g1 = A[0]
    for i, a in enumerate(A):
        g1 = gcd(g1, a)

        for x, _ in factor(a):
            for y in range(x, M1, x):
                if dp[y]:
                    for i in range(i, N):
                        a = A[i]
                        g1 = gcd(g1, a)
                        if g1 == 1:
                            print("setwise coprime")
                            return
                    print("not coprime")
                    return
                dp[y] = 1

    print("pairwise coprime")

if __name__ == "__main__":
    resolve()
