#[allow(unused_imports)]
use proconio::{input, marker::*};

#[allow(unused_imports)]
use std::collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, VecDeque};

#[allow(unused_imports)]
use std::io::Write;

#[allow(unused_macros)]
macro_rules! debug {
    ($($a:expr),*) => {
        #[cfg(debug_assertions)]
        writeln!(&mut std::io::stderr(), concat!("[DEBUG] ", $(stringify!($a), "={:?} "),*), $($a),*).unwrap();
    }
}

fn eratosthenes(n: usize) -> Vec<usize> {
    let mut set = (2..n + 1).collect::<BTreeSet<_>>();
    let mut vec = Vec::new();
    loop {
        let p = set.iter().next().cloned().unwrap();
        if p * p > n {
            vec.extend(&set.into_iter().collect::<Vec<_>>());
            break vec;
        }
        let mut i = p;
        while i <= n {
            set.remove(&i);
            i += p;
        }
        set.remove(&p);
        vec.push(p);
    }
}

fn gcd(a: usize, b: usize) -> usize {
    if a == usize::default() {
        b
    } else {
        gcd(b % a, a)
    }
}

fn main() {
    input! {
        n: usize,
        a: [usize; n],
    }

    let mut g = a[0];
    for &e in &a {
        g = gcd(e, g);
    }

    if g > 1 {
        println!("not coprime");
        return;
    }

    let vec = eratosthenes(1000);

    for p in vec {
        let mut flag = false;
        for &e in &a {
            if e % p == 0 {
                if flag {
                    println!("setwise coprime");
                    return;
                }
                flag = true;
            }
        }
    }
    println!("pairwise coprime");
}
