n = int(input())
a = list(map(int,input().split()))
MAX = 10**6+5

divs = [[] for _ in range(MAX)]
cnt = [0]*MAX

for i in range(2,n):
  m = i
  while m < MAX:
    divs[m].append(i)
    m += i
    
pair = True
setwise = True

for i in range(n):
  for d in divs[a[i]]:
    if cnt[d] > 0:
      pair = False
    cnt[d] += 1
    
if pair:
  print('pairwise coprime')
else:
  for i in range(MAX):
    if cnt[i] == n:
      setwise = False
      break
  if setwise:
    print('setwise coprime')
  else:
    print('not coprime')