from math import gcd
n = int(input())
a = list(map(int, input().split()))

cnt =0
for i in range(0, n-1):
    for j in range(i+1, n):
        if(gcd(a[i], a[j]) == 1):
            cnt += 1

if cnt == n*(n-1)//2:
    print("pairwise coprime")

else:
    g = gcd(a[0],a[1])
    for i in range(2, n):
        g = gcd(g, a[i])

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

