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

from math import gcd

r = a[0]
for i in a:
    r = gcd(r, i)

c = [0 for _i in range(10**6+1)]
h = True
for i in a:
    if i==1:
        continue
    num = i
    for j in range(2, int(num**.5)+2):
        if num%j == 0:
            c[j] += 1
            if c[j] >= 2:
                h = False

    if num == i:
        if c[num] >= 1:
            h = False
        else:
            c[num] += 1

    if h==False:
        break

if h == True:
    print('pairwise coprime')
elif r == 1:
    print('setwise coprime')
else:
    print('not coprime')