from math import gcd # <Python3.5
# --------------------------------------------------------------

n = int(input())
lis = list(map(int,input().split()))

now = 0
total = 0

flg1 = 0
flg2 = 0

for i in range(n-1):
    if i>0:
        total = gcd(now,lis[i+1])
    now = gcd(lis[i],lis[i+1])
    
    if now != 1:
        flg1 = 1
    if total==1:
        flg2 = 1

if flg1==0:
    print('pairwise coprime')
elif flg2==1:
    print('setwise coprime')
else:
    print('not coprime')