import math

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

lcmv = a[0]
sekikun = a[0]
for i in range(1, n):
    gcdv = math.gcd(lcmv, a[i])
    lcmv *= a[i]
    lcmv //= gcdv
    sekikun *= a[i]
    if sekikun != lcmv:
        break
    if i == n - 1:
        print("pairwise coprime")
        exit()


gcdv=a[0]
for i in range(1, n):
    gcdv = math.gcd(gcdv, a[i])
if gcdv == 1:
    print("setwise coprime")
else:
    print("not coprime")