rom math import gcd
def MinimumGCD(arr, n): 
    g = 0 
    for i in range(n): 
        g = gcd(g, arr[i]) 
    return g 
def isPrime(k):
    if (k == 1):
        return 0
    else:
        i=2
        while(i*i<k):
            if(k%i==0):
                return 1
            i+=1
        return 0
n=int(input())
a=list(map(int,input().split()))
primecount=0
for i in range(n):
    primecount+=(isPrime(a[i]))
if(primecount<=1):
    print('pairwise coprime')
else:
    if(MinimumGCD(a,n)==1):
        print('setwise coprime')
    else:
        print('not coprime')

