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

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

is_set = False
is_pair = True

first = True
for i in range(n-1):
    for j in range(i+1, n):
        g = gcd(As[i], As[j])

        if first:
            g0 = g
            first = False
        else:
            g0 = gcd(g0, g)

        if g == 1:
            is_set = True
        else:
            is_pair = False

if is_pair:
    print("pairwise coprime")
elif is_set or g0 == 1:
    print("setwise coprime")
else:
    print("not coprime")