import math
n = int(input())
a = list(map(int,input().split()))
t = [0]*1000
s = []
for i in range(n):
    for j in range(2,1000):
        if(a[i]%j == 0):
            t[j] += 1
            a[i] //= 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')