use proconio::{fastout, input};

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

    let mut do_continue = true;
    let mut ans = "pairwise coprime";

    for i in 2..(1_000_000f64.sqrt()) as usize + 1 {
        let mut d_count = 0;
        for j in 0..n {
            if a[j] % i == 0 {
                d_count += 1;
            }
        }
        if d_count > 1 {
            do_continue = false;
            ans = "not coprime";
            break;
        }
    }

    if !do_continue {
        let mut c = a[0];
        for i in 1..n {
            c = num::integer::gcd(c, a[i]);
        }
        if c == 1 {
            ans = "setwise coprime";
        }
    }

    println!("{}", ans);
}
