MAXN = 1000001
spf = [i for i in range(MAXN)] 
hash1 = [0 for i in range(MAXN)] 
def sieve(): 
    for i in range(4, MAXN, 2): 
        spf[i] = 2

    for i in range(3, MAXN): 

        if i * i < MAXN: 
            break
        if (spf[i] == i): 
            for j in range(i * i, MAXN, i): 
                if (spf[j] == j): 
                    spf[j] = i  
def getFactorization(x): 
    while (x != 1): 
        temp = spf[x] 
        if (x % temp == 0): 
            hash1[spf[x]] += 1
            x = x // spf[x] 
        while (x % temp == 0): 
            x = x // temp 
def check(x): 

    while (x != 1): 
        temp = spf[x] 
        if (x % temp == 0 and hash1[temp] > 1): 
            return False
        while (x % temp == 0): 
            x = x //temp 
	
    return True

def hasValidNum(arr, n): 
    sieve() 

    for i in range(n): 
        getFactorization(arr[i]) 
    f=0;
    for i in range(n): 
        if (check(arr[i])==False):
            #print(arr[i])
            f=1
    if(f==1):
        return False
    return True;

n=int(input())
arr=list(map(int,input().split()))
if (hasValidNum(arr, n)): 
    print("pairwise coprime")
else:
    f=0
    for i in hash1:
        if i==n:
            print("not coprime")
            f=1
            break
    if f==0:
        print("setwise coprime")

