#abc177 e
import sys,math,collections,itertools
import functools
input = sys.stdin.readline


N=int(input())
A=list(map(int,input().split()))
num = [0]*(10**6+1)

fact = [0]*(10**6+1)
mn = 1
for a in A:
    if a != 1:
        temp = a
        i=2
        if mn>1:
            break
        if temp%i==0:
            while temp%i==0:
                temp //= i
            flag = 1
            fact[i]+=1
            mn = max(mn,fact[i])
            if mn>1:
                break
        
        for i in range(3, int(-(-a**0.5//1))+1,2):
            if temp%i==0:
                while temp%i==0:
                    temp //= i
                flag = 1
                fact[i]+=1
                mn = max(mn,fact[i])
                if mn>1:
                    break
        if temp!=1:
            fact[temp]+=1
            mn = max(mn,fact[i])
            if mn>1:
                break

if mn == 1:
    print('pairwise coprime')
else:
    if functools.reduce(math.gcd,A)!=1:
        print('not coprime')
    else:
        print('setwise coprime')
