n = int(input())
a = list(map(int, input().split()))
def factors(x):
    f = []
    i = 2
    while i <= int(x**.5+1):
        while x%i==0:
            f.append(i)  
            x //= i
        i += 1
    if x > 1:
        f.append(x)
    return set(f)

import math
gcd_list = []
g = a[0]
for j in a[1:]:
    g = math.gcd(g,j)


flg=0
z = factors(a[0])
for i in a[1:]:
    zz = factors(i)
    if not(z & zz):
        z |= zz
    else:
        flg=1
        break

if not flg:
    print('pairwise coprime')
    exit()

if g == 1:
    print('setwise coprime')
    exit()

print('not coprime')