from math import gcd

n = int(input())
A = list(map(int, input().split()))
left, right = [0] * n, [0] * n

left[0] = A[0]
for i in range(1, n - 1):
    left[i] = gcd(left[i - 1], A[i])

right[-1] = A[-1]
for i in range(1, n - 1)[::-1]:
    right[i] = gcd(right[i + 1], A[i])

flag=0
for i in range(1,n-1):
    if left[i]!=1:
        flag=1
for i in range(1,n-1):
    if right[i]!=1:
        flag=1
if flag==0:print("pairwise coprime");exit()
cnt=1
for i in range(1,n):
    cnt=max(cnt,gcd(left[i-1],right[i]))
if cnt==1:print("setwise coprime");exit()
print("not coprime")