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

from math import gcd


f = True
l = 1
for i in range(n):
    x = gcd(a[i],l)
    if x!=1:
        f = False
        break
    l = l*a[i]//x
    
if f:
    print('pairwise coprime')
    exit()

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

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