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

import math
MOD=10**9+7
flg=0
temp=a[0]
temp1=a[0]
for i in range(1,n):
    temp=math.gcd(temp,a[i])
    if math.gcd(temp1,a[i]) == 1:
        temp1*=a[i]
        temp1%=MOD
        if i==n-1:
            flg=2
    if temp!=1 and i==n-1:
        flg=1
if flg==2:
    print('pairwise coprime')
elif flg==1:
    print("not coprime")
else:
    print("setwise coprime")