use proconio::input;
extern crate num_integer;

fn main() {
    input! {
        n: usize,
        a: [u32;n],
    };
    let maxa = *a.iter().max().unwrap();
    let mut b = Vec::new();
    let mut ps = Vec::new();
    b.push(0);
    b.push(1);
    {
        for i in 2..maxa+1 {
            let mut x = i;
            for &p in ps.iter() {
                if i % p == 0 {
                    x = p;
                    break;
                }
            }
            if x == i {
                ps.push(x);
            }
            b.push(x);
        }
    }
    let mut f = vec![vec![]; n];
    for i in 0..n {
        let mut t = a[i];
        while t != 1 {
            let d = b[t as usize];
            f[i].push(d);
            t /= d;
        }
    }
    let mut pairwise = true;
    for p in ps.iter() {
        let mut cnt = false;
        for fs in f.iter() {
            if fs.iter().filter(|&x| p == x).count() >= 1 {
                if cnt {
                    pairwise = false;
                    break;
                } else {
                    cnt = true;
                }
            }
        }
        if !pairwise {
            break;
        }
    }
    if pairwise {
        println!("pairwise coprime");
        return;
    }
    let mut setwise = false;
    let mut g = a[0];
    for i in 1..n {
        g = num_integer::gcd(g, a[i]);
        if g == 1 {
            setwise = true;
            break;
        }
    }
    if setwise {
        println!("setwise coprime");
    } else {
        println!("no coprime");
    }
}
