# O(n^2)未満
import math
import sys
n = int(input())
a = list(map(int, input().split()))

ispair = True
isset = False

gcds = [0 for i in range(n-1)]
prev = a[0]
for i in range(1, n):
    prev = math.gcd(a[i], prev)
if prev == 1:
    isset = True
else:
    print("not coprime")
    exit(0)

dp = [a[0] for i in range(n)]
for i in range(1, n-1):
    dp[i] = int(a[i] * a[i-i] / math.gcd(a[i], a[i-1]))
# print(dp)

for i in range(1, n):
    if math.gcd(a[i], dp[i-1]) != 1:
        print("setwise coprime")
        exit(0)
print("pairwise coprime")
