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 0..n {
        for j in i + 1..n {
            let c = num::integer::gcd(a[i], a[j]);
            if c != 1 {
                do_continue = false;
                ans = "not coprime";
                break;
            }
        }
        if !do_continue {
            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);
}
