from itertools import combinations
import math
import sys
import functools

N = int(input())
A = list(map(int, input().split()))
lis = list(combinations(A, 2))

gcd = []
for i, j in lis:
    gcd.append(math.gcd(i, j))
if max(gcd) ==1:
    print('pairwise coprime')
    sys.exit()


ans = functools.reduce(math.gcd, A)
if ans == 1:
    print('setwise coprime')
else:
    print('not coprime')