n=int(input())
a=list(map(int,input().split()))

def gcd(a, b):
  if b == 0:
    return a
  return gcd(b, a%b)

import math
tmp = a[0]
for i in range(1,n):
  tmp = gcd(tmp, a[i])

s = [0] * (max(a)+1)
for i in range(n):
  for j in range(2,max(a)):
    if j*j > max(a):
      break
    if a[i] % j == 0:
      s[j] += 1
  
if tmp != 1:
  print('not coprime')
elif max(s) != 1:
  print('setwise coprime')
else:
  print('pairwise coprime')