n=int(input())
import copy
a=list(map(int,input().split()))
q=copy.copy(a)
l=[]
for i in range(n):
  b=a[i]**0.5
  ll=set()
  j=2
  while j<=int(b):
    if a[i]%j==0:
      ll.add(j)
      a[i]//=j
    else:
      j+=1
  if a[i]>b:
    l.append(b)
  l+=list(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')