
#![allow(dead_code)]
fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}
fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>().split_whitespace()
        .map(|e| e.parse().ok().unwrap()).collect()
}
fn read_vec2<T: std::str::FromStr>(n: usize) -> Vec<Vec<T>> {
    (0..n).map(|_| read_vec()).collect()
}
use num::integer::gcd;
use std::collections::HashSet;
fn main() {
    const MAX_A: usize = 1000000;
    let n: usize = read();
    let a: Vec<usize> = read_vec();
    let d: Vec<usize> = {
        let mut t: Vec<usize> = (0..MAX_A + 1).collect();
        let mut i = 2;
        while i * i <= MAX_A {
            if t[i] == i {
                let mut j = i + i;
                while j <= MAX_A {
                    t[j] = i;
                    j += i;

                }
            }
            i += 1;
        }
        t
    };
    let mut ans = "pairwise coprime";
    let mut hs = HashSet::new();
    for i in &a {
        let mut t = HashSet::new();
        let mut i = *i;
        while i > 1 {
            t.insert(d[i]);
            i /= d[i];
        }
        if t.intersection(&hs).count() != 0 {
            ans = {
                if a.iter().fold(a[0], |s, x| gcd(s, *x)) == 1 {"setwise coprime"}
                else {"not coprime"}
            };
        }
        hs = hs.union(&t).map(|s| *s).collect();
    }
    println!("{}", ans);
}
