
function Main(input) {
  const N = parseInt(input.split("\n")[0])
  const A = input.split("\n")[1].trim().split(' ').map(Number)
  var result1 = true;

  g_loop:
  for (i=0;i<N-1;i++){
    for(j=i+1;j<N;j++){
      if (gcd(A[i],A[j]) !== 1){
        result1 = false;
        break g_loop;
      }
    }
  }
  
  if (result1 ==true){
    console.log("pairwise coprime")
  }
  else if (gcd2.apply(this,A)===1){
    console.log("setwise coprime")
  } else {
    console.log("not coprime")
  }
  }

  
  
 
  function gcd(a, b) {
    if (b === 0){
        return a
    }
    return gcd(b, a % b)
}

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

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