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)
  
max_a=alist[-1]  
inv_table = [0]+[1]
for i in range(2,max_a+1):
  inv_table.append(-(MOD//i)*inv_table[MOD%i]%MOD)
  
lcm_MOD=1
prod_MOD=1
for i in range(N):
  gcd_term=math.gcd(lcm_MOD,alist[i])
  lcm_MOD=lcm_MOD*alist[i]*inv_table[gcd_term]
  prod_MOD*=alist[i]
  lcm_MOD%=MOD  
  prod_MOD%=MOD
  if lcm_MOD!=prod_MOD:
    print("setwise coprime")
    sys.exit(0)
    
print("pairwise coprime")