import sys
from math import gcd
input = sys.stdin.readline
N = int(input())
a = list(map(int, input().split()))
mx = max(a)
table = [0] * (mx + 1)
for x in a: table[x] += 1
g = 0
for x in a: g = gcd(g, x)
for i in range(2, mx + 1):
  c = 0
  for j in range(i, mx + 1, i): c += table[j]
  if c > 1:
    if g == 1: print("setwise coprime")
    else: print("not coprime")
    exit(0)
print("pairwise coprime")