from fractions import gcd
import sys
input = lambda : sys.stdin.readline().rstrip()

n = int(input())
As = map(int, input().split(" "))

is_set = False

first = True
A0 = As[0]
for i in range(1, n):
    if i == 1:
        g = gcd(A0, As[i])
    else:
        g = gcd(g, As[i])

    if g == 1:
        is_set = True
        break

if is_set:
    is_pair = True
    As = list(set(As))
    n = len(As)
    for i in range(n-1):
        for j in range(i+1, n):
            g = gcd(As[i], As[j])
            if g != 1:
                is_pair = False
                break
else:
    is_pair = False

if is_pair:
    print("pairwise coprime")
elif is_set:
    print("setwise coprime")
else:
    print("not coprime")