import math

N = int(input())
A = [int(i) for i in input().split()]
flag =False
ans = math.gcd(A[0], A[1])
tmp = math.gcd(A[0], A[1])
maxa = (A[0] * A[1] // math.gcd(A[0], A[1]))
if tmp > 1:
    flag = True
for i in range(2, N):
    ans = math.gcd(ans, A[i])
    tmp = math.gcd(maxa, A[i])
    if tmp > 1:
        flag = True
    maxa = (maxa * A[i]) // tmp
if ans > 1:
    print('not coprime')
    exit()
if flag:
    print('setwise coprime')
else:
    print('pairwise coprime')