from itertools import combinations
import math
import sys

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

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

ans = A[0]
for i in range(1, N):
    ans = math.gcd(ans, A[i])
if ans == 1:
    print('setwise coprime')
else:
    print('not coprime')