n = int(input())
list1 = list(map(int,input().split()))
list2 = []
def gcd(a,b):
  while b != 0:
    a, b = b, a%b
  return a
a = gcd(list1[0],list1[1])
for i in range(n):
  for j in range(i+1,n):
    g = gcd(list1[i],list1[j])
    if g not in list2:
      list2.append(g)
      a = gcd(a, g)
if list2 == [1]:
  print('pairwise coprime')
else:
  if a == 1:
    print('setwise coprime')
  else:
    print('not coprime')