import math
n=int(input())
arr=list(map(int, input().rstrip().split()))
start=0
pair=0
set=0
for i in range(start,n-1):
  for j in range(start+1,n):
    if (math.gcd(arr[i],arr[j])) != 1:
        pair=1
        break
  start+=1
gcd=math.gcd(arr[0],arr[1])
for i in range(2,n):
    gcd=math.gcd(gcd,arr[i])
if gcd==1:
    set=1
if pair==0:
    print("pairwise coprime")
elif set==1:
    print("setwise coprime")
else:
    print("not coprime")
