from math import gcd
N = int(input())
A = list(map(int,input().split()))

A.reverse()
val = A[0]
flg = True
for i in range(1,N):
    if gcd(val,A[i]) != 1:
        flg = False
    val *= A[i]
if flg == True:
    print('pairwise coprime')
    exit()





val = A[0]
for i in range(1,N):
    val = gcd(val,A[i])
if val == 1:
    print('setwise coprime')
    exit()
print('not coprime')