function Main(input) {

	input = input.split("\n");
    
    let An = input[1].split(" ").map(Number);
    
    let pcflag = true;
    let scflag = false;
    
    loop:
    for (let i = 0; i < An.length - 1; i++) {
        
        for (let j = i + 1; j < An.length; j++) {
            
            if(gcd(An[i], An[j]) != 1) {
                
                pcflag = false;
                break loop;
                
            }
            
        }
        
    }
    
    if (!pcflag) {
        
        if (gcd(...An) === 1) scflag = true;
        
    }
    
    if (pcflag) console.log("pairwise coprime");
    else if (scflag) console.log("setwise coprime");
    else console.log("not coprime");
    
}

function gcd(...arg) {
    
    var f = (a, b) => b ? f(b, a % b) : a
    var ans = arg[0]
    for (var i = 1; i < arg.length; i++) {
        ans = f(ans, arg[i]); 
    }
    return ans;
    
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));