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

from math import gcd
from functools import reduce

def gcd_list(L):
    return reduce(gcd, L)

g = gcd_list(A)

cnt = [0] * 100
for a in A:
    for k in [2, 3, 5, 7, 11, 13, 17, 19]:
        if a % k == 0:
            cnt[k] += 1

ma = max(cnt)

if ma == 1:
    print('pairwise coprime')
elif g == 1:
    print('setwise coprime')
else:
    print('not coprime')