#![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:usize = N;
  let l = A[A.len() - 1] as usize;
  let mut mx = 0;
  let mut e = vec![true; l + 1];
  let mut f = vec![0usize; l + 1];
  e[0] = false;
  e[1] = false;
  for i in 2..=l {
    let t = e[i];
    if t {
      for j in i + 1..=l {
        e[j] = false;
      }
      for j in 0..N {
        if A[j] % i  == 0 {
          f[i] += 1
        }
      }
    }
  }
  debug!(f);
  for x in f {
    mx = max(mx, x);
  }
  if mx <= 1 {
    println!("pairwise coprime")
  } else if mx < N {
    println!("setwise coprime");
  } else {
    println!("not coprime")
  }
}
