import sys
import math
N = int(input())
A = list(map(int, input().split()))

gcd = A[0]
for i in range(1, N):
    gcd = math.gcd(gcd, A[i])
if gcd != 1:
    print("not coprime")
    sys.exit()



NUM = 10**6
T = [True]*(NUM+1)
prime = []
for i in range(3, NUM+1, 2):
    if T[i]:
        prime.append(i)
        tmp = i
        while tmp <= NUM:
            T[tmp] = False
            tmp += i
L = len(prime)
T = [False]*L
print("ok")
for num in A:
    for i in range(L):
        p = prime[i]
        if num%p == 0:
            if T[i]:
                print("setwise coprime")
                sys.exit()
            T[i] = True
            while num%p == 0:
                num //= p
print("pairwise coprime")

