from math import gcd
from collections import defaultdict
n = int(input())
A = tuple(map(int, input().split()))
x = A[0]
M1 = defaultdict(int)
M2 = defaultdict(int)
for a in A:
    x = gcd(x, a)
    cnt = 0
    while a%2 == 0:
        cnt += 1
        a //= 2
    if cnt >= M1[2]:
        M2[2] = M1[2]
        M1[2] = cnt
    elif cnt >= M2[2]:
        M2[2] = cnt
    f = 3
    cnt = 0
    while f*f <= a:
        if a%f == 0:
            cnt += 1
            a //= f
        else:
            if cnt >= M1[f]:
                M2[f] = M1[f]
                M1[f] = cnt
            elif cnt >= M2[f]:
                M2[f] = cnt
            f += 2
            cnt = 0
    if a != 1:
        if 1 >= M1[a]:
            M2[a] = M1[a]
            M1[a] = 1
        elif 1 >= M2[a]:
            M2[a] = 1
if x != 1:
    print("not coprime")
    exit()
for d in M2.values():
    if d >= 1:
        print("setwise coprime")
        exit()
print("pairwise coprime")