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

from math import gcd

g = a[0]
l = 1
f = True
for i in range(n):
    if f:
        x = gcd(a[i],l)
        if x!=1:
            f = False
        l = l*a[i]//x
    g = gcd(g,a[i])

if f:
    print('pairwise coprime')
elif g==1:
    print('setwise coprime')
else:
    print('not coprime')