#![allow(non_snake_case)]
#![allow(unused_imports)]
use proconio::input;
use std::collections::HashSet;
// use std::collections::VecDeque;
// use std::cmp::max;
// use std::cmp::min;


fn gcd(a: i64, b: i64) -> i64 {
    if b == 0 {
        return a;
    }

    return gcd(b, a % b);
}

fn main() {
    input! {
        N: usize,
        As: [i64; N],
    }

    let pc = String::from("pairwise coprime");
    let sc = String::from("setwise coprime");
    let nc = String::from("not coprime");

    let mut all_gcd = As[0];
    for &a in As.iter() {
        all_gcd = gcd(all_gcd, a);
    }

    // 素数表を持っておく
    let mut is_prime: Vec<bool> = vec![true; 1000_000 + 10];
    let mut primes: Vec<i64> = Vec::new();
    is_prime[0] = false;
    is_prime[1] = false;

    for p in 2..1000 + 10 {
        if !is_prime[p] {
            continue;
        }

        primes.push(p as i64);

        for q in (p + p..1000 + 10).step_by(p) {
            is_prime[q] = false;
        }
    }

    let mut common_primes: HashSet<i64> = HashSet::new();

    let mut is_pc = true;

    // 素因数分解をしよう
    for &a in As.iter() {
        if a == 1 {
            continue;
        }

        let mut a_copy = a;

        for &p in primes.iter() {
            if p > ((a as f64).sqrt() + 10.0) as i64 {
                break;
            }

            if a_copy % p == 0 {
                if common_primes.contains(&p) {
                    is_pc = false;
                    break;
                }

                common_primes.insert(p);

                while a_copy % p == 0 {
                    a_copy /= p;
                }
            }

            if !is_pc {
                break;
            }
        }
    }

    let ans = if is_pc {
        pc
    } else {
        if all_gcd == 1 { sc } else { nc }
    };
    println!("{}", ans);
}
