import numpy as np
N=int(input())
A=list(map(int,input().split()))
flag=0
if np.gcd.reduce(A)!=1:
  flag=1
  print("not comprime")
if flag==0:
  flag1=0
  for i in range (N):
    for j in range (N):
      if i!=j and np.gcd(A[i],A[j])!=1:
        flag1=1
      if flag1:
        break
    if flag1:
      break
if flag==0 and flag1==0:
  print("pairwise coprime")
elif flag==0:
  print("setwise coprime")