import sys
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

n = int(input())
a = sorted(map(int,input().split()), reverse =True)

if gcd(*a) != 1:
  print("not coprime")
  sys.exit()

#print(a)
for i in range(n):
  for j in range(i+1,n):
    if (gcd(a[i],a[j]) != 1): 
      	print("setwise coprime")
      	sys.exit()

print("pairwise coprime")