n=int(input())
import copy
a=list(map(int,input().split()))
q=copy.copy(a)
l=[]
prime=[True]*(max(a)+1)
prime[0]=False
prime[1]=False
for i in range(2,int(max(a)**0.5)+1):
  if not prime[i]:
    continue
  for j in range(i*2,max(a)+1,i):
    prime[j]=False
primetab=[i for i in range(max(a)+1) if prime[i]]
for i in range(n):
  b=i**0.5
  ll=[]
  for j in primetab:
    if a[i]%j==0:
      ll.append(j)
      a[i]//=j
  if a[i]>b:
    l.append(a[i])
  l+=ll
x=len(l)
y=len(set(l))
if x==y:
  print('pairwise coprime')
  exit()
from math import gcd
g=gcd(q[0],q[1])
if n==2:
  print('setwise coprime' if g==1 else 'not coprime')
  exit()
for i in range(2,n):
  g=gcd(g,q[i])
if g==1:
  print('setwise coprime')
else:
  print('not coprime')