import numpy as np
def main():
  n=int(input())
  a=list(map(int,input().split()))
  pairwise_coprime=0 
  for i in range(n-1):
    a_i=a[i]
    for j in range(i+1,n):
      #print(np.gcd(6,10))
      if (np.gcd(a_i,a[j])==1):
        pairwise_coprime+=1
      else:
        if pairwise_coprime>1:
          break
  if pairwise_coprime==(n*(n-1))//2:
    print("pairwise coprime")
  elif np.gcd.reduce(a)==1:
    print("setwise coprime")
  else:
    print("not coprime")
main()