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

    
from math import gcd

def lcm(x, y):
    return (x * y) // gcd(x, y)

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

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