import math
n = int(input())
a = list(map(int,input().split()))
s = []
t = [0]*1010
u = []
for i in range(2,1010):
    x = 1
    for j in range(2,i):
        if(i%j == 0):
            x = 0
            break
    if(x == 1):
        u.append(i)
m = len(u)
for i in range(n):
    for j in range(m):
        if(a[i]%u[j] == 0):
            t[j] += 1
            a[i] //= u[j]
            if(a[i] == 1):
                break
    if(a[i] != 1):
        s.append(a[i])
if(max(t) == n):
    print('not coprime')
elif(max(t) <= 1):
    z = 0
    for i in range(1,len(s)):
        for j in range(i):
            if(math.gcd(s[i],s[j]) > 1):
                z = 1
                break
    if(z == 1):
        print('setwise coprime')
    else:
        print('pairwise coprime')
else:
    print('setwise coprime')