#[allow(unused_imports)]
use {
    proconio::{fastout, input, marker::*},
    std::cmp::*,
    std::collections::*,
    std::ops::*,
};

fn gcd(a: usize, b: usize) -> usize {
    if b == 0 {
        a
    } else {
        gcd(b, a % b)
    }
}

#[fastout]
fn main() {
    input! {
        n: usize,
        a: [usize; n]
    }
    let mut x = a[0];
    for i in 1..n {
        x = gcd(x, a[i]);
    }

    if x != 1 {
        println!("not coprime");
        return;
    }

    let mut set = BTreeSet::<usize>::new();
    for i in 0..n {
        if set.contains(&a[i]) {
            println!("setwise coprime");
            return;
        }
        set.insert(a[i]);
    }

    let mut is_prime = vec![true; 1000001];
    for i in 2..=1000000 {
        if !is_prime[i] {
            continue;
        }
        let mut count = 0;
        if set.contains(&i) {
            count += 1;
        }
        for j in 2..=1000000 / i {
            is_prime[i * j] = false;
            if set.contains(&(i * j)) {
                count += 1;
                if count == 2 {
                    println!("setwise coprime");
                    return;
                }
            }
        }
    }
    println!("pairwise coprime");
}
