#![allow(
  non_snake_case,
  unused_variables,
  unused_assignments,
  unused_mut,
  unused_imports,
  unused_macros,
  dead_code
)]
use proconio::fastout;
use proconio::input;
use proconio::marker::*;
use std::cmp::*;
use std::collections::*;
//use std::collections::VecDeque;
macro_rules! debug {
  ($($a:expr),* $(,)*) => {
      #[cfg(debug_assertions)]
      eprintln!(concat!($("| ", stringify!($a), "={:?} "),*, "|"), $(&$a),*);
  };
}
#[fastout]
fn main() {
  input! {
    N:usize,
    mut A:[usize;N]
  }
  A.sort();
  let N_original: usize = N;
  let nmax = 1000_000usize;
  A.sort();
  A.dedup();
  //let nmax = A[A.len() - 1];
  let reduced = N_original - A.len();
  if A.len() == 1 {
    println!("not coprime");
    return;
  }
  let N = A.len();
  if reduced == 0 {
    let N: usize = A.len();
    let mut isprime = vec![true; nmax + 1];
    let mut f = vec![0usize; nmax + 1];
    isprime[0] = false;
    isprime[1] = false;
    let mut i = 2;
    while i * i <= nmax {
      if isprime[i] {
        let mut j = 2;
        while i * j <= nmax {
          isprime[i * j] = false;
          j += 1;
        }
      }
      i += 1;
    }
    let mut pflag = true;
    for p in 2..=nmax {
      if isprime[p] {
        let mut f = 0usize;
        for j in 0..N {
          if A[j] % p == 0 {
            f += 1
          }
        }
        debug!(p, f);
        if f > 1 {
          pflag = false;
          break;
        }
      }
    }
    if pflag {
      println!("pairwise coprime");
      return;
    }
  }

  if A.len() > 1 && issetwise(A) {
    println!("setwise coprime");
  } else {
    println!("not coprime")
  }
}
fn gcd(a: usize, b: usize) -> usize {
  if b == 0 {
    a
  } else {
    gcd(b, a % b)
  }
}
fn issetwise(A: Vec<usize>) -> bool {
  let mut a = A[0];
  for i in 1..A.len() {
    a = gcd(a, A[i]);
    if a == 1 {
      return true;
    }
  }
  return false;
}
