from math import gcd

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

d = a[0]
m = a[0]

g = True

for i in range(1, n):
    d = gcd(d, a[i])

if d != 1:
    print("not coprime")
else:
    for i in range(1, n):
        #pairwise
        if gcd(m, a[i]) != 1:
            g = False
            break
        else:
            m *= a[i]

    if not g:
        print("setwise coprime")
    else:
        print("pairwise coprime")