from fractions import gcd
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()

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

if result2.count(1) == len(arr) - 1:
    print("setwise coprime")
else:
    print("not coprime")