use proconio::input;
use num_integer::gcd;

fn main() {
    input! { n: usize }
    let mut a = vec![];
    let mut ma = 0;
    for _ in 0..n {
        input! { ai: usize }
        a.push(ai);
        ma = ma.max(ai);
    }

    let mut p_min = vec![1; ma + 1];
    for i in 2..=ma {
        if p_min[i] == 1 {
            let mut j = 1;
            while i * j < ma {
                if p_min[i * j] == 1 {
                    p_min[i * j] = i;
                }
                j += 1;
            }
        }
    }

    let mut pc = true;
    let mut done = vec![false; ma + 1];
    for i in 0..n {
        let mut v = a[i];
        let mut p = p_min[v];

        while p > 1 && p != v {
            if done[p] {
                pc = false;
                break;
            } else {
                done[p] = true;
                while p_min[v / p] == p {
                    v /= p;
                }
                p = p_min[v];
            }
        }
        done[p] = true;
    }

    let mut v = a[0];
    for i in 1..n {
        v = gcd(v, a[i]);
    }

    println!("{} coprime", if pc {
        "pairwise"
    } else if v == 1 {
        "setwise"
    } else {
        "not"
    });
}
