
#input routine
n = int(input())
line = [int(x) for x in input().split()]

#euclidean algo
def gcd(a,b):
    if (a == 0):
        return b
    else:
        return (gcd(b%a, a))

#get product
prod = 1
for i in range(0, len(line)):
    prod *= line[i]

#get lcm
lcm = 1
for i in range(0, len(line)):
    g = gcd(lcm, line[i])
    lcm = g* (lcm/g)* (line[i]/g)

if prod == lcm:
    print("pairwise coprime")
else:
    #get set gcd
    g = line[0]
    for i in range(1, len(line)):
        g = gcd(g, line[i])

    if (g == 1):
        print ("setwise coprime")
    else:
        print ("not coprime")
