from math import gcd
n = int(input())
A = [int(i) for i in input().split()]

def lcm(a,b):
    return a*b//gcd(a,b)

first_prod = A[0]
first_lcm = A[0]
for i in range(1, n):
    first_prod *= A[i]
    first_lcm = lcm(first_lcm, A[i])
    if first_prod != first_lcm:
        break #not pairwise
else:
    print("pairwise coprime")
    exit()

first_gcd = A[0]
for i in range(1, n):
    first_gcd = gcd(first_gcd, A[i])
    if first_gcd == 1:
        print("setwise coprime")
        break
else:
    print("not coprime")