n = int(input())
a = list(map(int,input().split()))
p = [0 for _ in range(10**6)]
pr = []
pr2 = [0 for _ in range(10**3)]
for i in range(2,10**3):
  if pr2[i] == 0:
    pr.append(i)
    now = i
    while True:
      try:
        pr2[now] = 1
        now += i
      except:
        break
#print(pr)
at = 0
for x in a:
  d = int(x)
  for y in pr:
    if d % y == 0:
      if p[y] == 1:
        at = 1
        #print(y)
      else:
        p[y] = 1
      while d % y == 0:
        d //= y
  if d != 1:
    p[d] += 1
  if at == 1:
    break
  #print(p)
if at == 0:
  print('pairwise coprime')
  exit()
now = int(a[0])
for x in a:
  big,sml = x,now
  while sml:
    #print(big,sml)
    big,sml = sml,big%sml
  now = big
  if now == 1:
    print('setwise coprime')
    exit()
  #print(now)
print('not coprime')