from math import gcd
N = int(input())
A = list(map(int,input().split()))
A.sort()
c = 0
flg = 0
for i in range(N-1,0,-1):
  for j in range(i-1,-1,-1):
    c = gcd(A[i],A[j])
    if c != 1:
      flg = 1
a = gcd(A[0],A[1])
for i in range(2,N):
  a = gcd(a,A[i])
if a == 1 and flg == 0:
  print("pairwise coprime")
elif a == 1 and flg == 1:
  print("setwise coprime")
else:
  print("not coprime")