use proconio::{input, fastout};

#[fastout]
fn main() {
    input!{
        n: usize,
        a: [usize; n]
    }
    let sc = a.iter().copied().fold(0, num::integer::gcd);
    if sc != 1 {
        println!("not coprime");
        return;
    }

    let mut is_pairwise = true;
    for i in 0..n {
        for k in i+1..n {
            let g = num::integer::gcd(a[i], a[k]);
            if g != 1 {
                is_pairwise = false;
            }
        }
    }
    if is_pairwise {
        println!("pairwise coprime");
        return;
    }
    println!("setwise coprime");
}
