#[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_devider(n: usize) -> Vec<usize> {
    let mut set = (2..n + 1).collect::<BTreeSet<_>>();
    let mut vec = (0..n + 1).collect::<Vec<_>>();
    loop {
        let p = set.iter().next().cloned().unwrap();
        if p * p > n {
            break vec;
        }
        let mut i = p;
        while i <= n {
            set.remove(&i);
            vec[i] = p;
            i += p;
        }
        set.remove(&p);
        vec[p] = 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 amx = a.iter().cloned().max().unwrap();
    let d = eratosthenes_devider(amx);
    let mut set = BTreeSet::new();
    for mut e in a {
        while e > 1 {
            if set.contains(&d[e]) {
                println!("setwise coprime");
                return;
            }
            set.insert(d[e]);
            let t = d[e];
            while e % t == 0 {
                e /= t;
            }
        }
    }
    println!("pairwise coprime");
}
