from functools import reduce
from math import gcd, ceil, sqrt
n = int(input())
aa = list(map(int, input().split()))
ma = max(aa)
cnt = [0] * (ma+1)

for a in aa:
    cnt[a] += 1

if reduce(gcd, aa) != 1:
    print('not coprime')
elif all(sum(cnt[i::i]) <= 1 for i in range(2, ceil(sqrt(ma)) + 1)):
    print('pairwise coprime')
else:
    print('setwise coprime')