#「全ての 1≤i<j≤N について、GCD(Ai,Aj)=1」が成り立つ
#pairwise coprime
#pairwise coprime ではなく、かつ、GCD(A1,…,AN)=1 
#setwise coprime
#それ以外
#not coprime
n = int(input())
a = list(map(int, input().split()))

import math
for i in range(2, int(max(a)**.5)+1):
    if sum([j%i == 0 for j in a]) >= 2:
        break
else:
    print('pairwise coprime')
    exit()

gcd = a[0]
for i in a[1:]:
    gcd = math.gcd(gcd, i)
    if gcd == 1:
        break
    
if gcd == 1:
    print('setwise coprime')
else:
    print('not coprime')