MOD=10**9+7
import sys
import math
N=int(input())
alist=list(map(int,input().split()))
alist.sort()

all_GCD=alist[0]
for i in range(1,N):
  all_GCD=math.gcd(all_GCD,alist[i])
  if all_GCD==1:
    break
else:
  print("not coprime")
  sys.exit(0)
  
aset=set(alist)
if len(aset)<N:
  print("setwise coprime")
  sys.exit(0)

lcm_MOD=1
prod_MOD=1
for i in range(N):
  lcm_MOD=lcm_MOD*alist[i]//math.gcd(lcm_MOD,alist[i])
  lcm_MOD%=MOD
  prod_MOD*=alist[i]
  prod_MOD%=MOD
#print(lcm_MOD,prod_MOD)

if lcm_MOD==prod_MOD:
  print("pairwise coprime")
else:
  print("setwise coprime")