import sys
from collections import defaultdict,Counter
input = sys.stdin.readline

N = int(input())
As = list(map(int,input().split()))
divisors = defaultdict(int)
def make_divisors(n):
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors[i]+=1
            if i != n // i:
                divisors[n//i]+=1

dvs = []
for i in As:
  make_divisors(i)

res=0
print(divisors)
for k,v in divisors.items():
  if k != 1 and v == N:
    res = 2
    break
  elif k != 1 and v>1:
    res = 1
#for i in com[1:]:
#  if i[1] == N:
#    res = 2
#    break
#  elif i[1] >1:
#    res = 1

if res == 0:
  print("pairwise coprime")
elif res == 1:
  print("setwise coprime")
else:
  print("not coprime")