from math import gcd,sqrt
from sys import exit
N = int(input())
A = list(map(int,input().split()))
cnt = A[0]
for i in A:
    cnt = gcd(cnt,i)
if cnt == 1:
    if N > 78498: print("setwise coprime")
    else:
        fipn = []
        for i in range(N):
            for j in range(2,int(sqrt(A[i])) + 1):
                if A[i] % j == 0:
                    if j in fipn:
                        print("setwise coprime")
                        exit()
                    fipn.append(j)
                    while A[i] % j == 0:
                        A[i] //= j
            if A[i] > 1:
                if A[i] in fipn:
                    print("setwise coprime")
                    exit()
                fipn.append(A[i])
        print("pairwise coprime")
else: print("not coprime")
