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
    if num%2==0:
        c[2] += 1
    for j in range(3, int(num**0.5)+1, 2):
        if num%j == 0:
            num //= j
            c[j] += 1
            if c[j] > 1:
                h = False
    c[i] += 1
    if c[i] > 1:
        h = False
    if h == False:
        break

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