from fractions import gcd
from collections import Counter
import sys

n = int(input())
arr = list(map(int, input().split()))

a = 1
result = []
for x in arr:
    y = gcd(a, x)
    result.append(y)
    a = a * x // y

if result.count(1) == len(arr):
    print("pairwise coprime")
    sys.exit()

if len(Counter(result[1:])) == 1:
    print("not coprime")
else:
    print("setwise coprime")