import sys
import cmath

input = sys.stdin.readline


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

GCD = p[0]
LCM = p[0]
mul = p[0]

done = False

for i in range(1, n):
    GCD = cmath.gcd(GCD, p[i])

    if not done:
        LCM = cmath.lcm(LCM, p[i])
        mul *= p[i]

    if LCM != mul:
        done = True

if not done:
    print("pairwise coprime")
elif done and GCD == 1:
    print("setwise coprime")
else:
    print("not coprime")
