#![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();
  //A.dedup();
  //let isremoved = N > A.len();
  //let N: usize = N;
  //if N == 1 {
  //  println!("not coprime");
  //  return;
  //}
  let nmax = 1000_000usize;
  let mut mx = 0;
  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 f = 0;
  for j in 0..N {
    if A[j] % 2 == 0 {
      f += 1
    }
  }
  mx = max(mx, f);
  let mut f = 0;
  for j in 0..N {
    if A[j] % 3 == 0 {
      f += 1
    }
  }
  mx = max(mx, f);

  let mut i6_1 = 7;
  while i6_1 <= nmax {
    if isprime[i6_1] {
      let mut f = 0;
      for j in 0..N {
        if A[j] % i6_1 == 0 {
          f += 1
        }
      }
      mx = max(mx, f);
    }
    i6_1 += 6;
  }
  let mut i6_5 = 5;
  while i6_5 <= nmax {
    if isprime[i6_5] {
      let mut f = 0;
      for j in 0..N {
        if A[j] % i6_5 == 0 {
          f += 1
        }
      }
      mx = max(mx, f);
    }
    i6_5 += 6;
  }
  if mx <= 1 {
    println!("pairwise coprime")
  } else if mx < N {
    println!("setwise coprime");
  } else {
    println!("not coprime")
  }
}
