'''
Created on 2020/08/29

@author: harurun
'''
def main():
  import math
  import heapq
  import copy
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write
  
  N=int(pin())
  A=list(map(int,pin().split()))
  heapq.heapify(A)
  B=copy.copy(A)  
  cnt=0
  for i in range(N):
    p=heapq.heappop(A)
    C=copy.copy(B)
    for j in range(N):
      q=heapq.heappop(C)
      if math.gcd(p,q)==1:
        cnt+=1
  if cnt==0:
    print("not coprime")
  elif cnt==N*N:
    print("pairwise coprime")
  else:
    print("setwise coprime")
  return 
main()
    