import math
N = int(input())
flag = True
a = list(map(int, input().split()))
maxval = max(a)
m = [-1]*(1000010)
a.sort()
cnt=0

for i in range(len(a)):
  if(a[i]==1):
    continue
  if(a[i]%2==0):
    cnt+=1
  if(m[a[i]]==1 or cnt==2):
    flag = False
    break
  tmp=a[i]
  multi=2
  while(tmp<=maxval):
    m[tmp]=1
    tmp=a[i]*multi
    multi+=1
    
if(flag):
  print("pairwise coprime")
else:
  ans = a[0]
  for i in range(1, N):
    ans = math.gcd(ans, a[i])
  if ans==1:
    print("setwise coprime")
  else:
    print("not coprime")