n=int(input())
a=list(map(int,input().split()))
mod=10**9+7
import sys
import math
def setwise_coprime(a):
  ans=a[0]
  for i in range(1,n):
    ans=math.gcd(ans,a[i])
  return ans
 
ruiseki=1
for i in range(n):
  ruiseki=ruiseki*a[i]
  
for i in range(n):
  num=math.gcd(a[i],(ruiseki//a[i])%a[i])
  if num!=1:
    if setwise_coprime(a)==1:
      print("setwise coprime")
      sys.exit()
    else:
      print("not coprime")
      sys.exit()
print("pairwise coprime")