n = int(input())
A = tuple(map(int, input().split()))
maxa = max(A)
cnt = [0] * (maxa + 1)
for a in A:
    cnt[a] += 1

from math import gcd
from functools import reduce
if reduce(gcd, A) != 1:
    print('not coprime')
else:
    for i in range(2, maxa+1):
        if sum(cnt[i::i]) > 1:
            print('setwise coprime')
            break
    else:
        print('pairwise coprime')
