import math
n = int(input())
a = list(map(int,input().split()))
arr = [0]*(max(a)+1)
flag = True
for i in a:
  arr[i] += 1
  
for i in range(2,max(a)+1):
  ans = 0
  for j in range(i,max(a)+1,i):
    ans += arr[j]
  if ans>1 and flag == True:
    flag = False
    break
  elif flag == False:
    break
    
g = a[0]  
for i in range(1,n):
  g = math.gcd(g,a[i])
  
if flag:
  print("pairwise coprime")
elif g == 1:
  print("setwise coprime")
else:
  print("not coprime")