from math import gcd

n = int(input())
a = list(map(int, input().split()))
MAX = max(a)
d = {}; g = 0
for i in a:
    d[i] = 1 if i not in d else d[i] + 1
    g = gcd(g, i)

if g > 1:
    print('not coprime')
else:
    for i in range(2, MAX + 1):
        f = 0
        for j in range(i, MAX + 1, i):
            f += d[j] if j in d else 0
        if f > 1:
            print('setwise coprime')
            break
    else:
        print('pairwise coprime')
