use proconio::{fastout, input};
use std::io::*;
use std::str::FromStr;

use std::cmp::{max, min};

use std::collections::HashSet;

fn divisors(n: i64) -> HashSet<i64> {
    let mut ds = vec![];
    let mut d = 1;
    while d * d <= n {
        if n % d == 0 {
            ds.push(d);
            ds.push(n / d);
        }
        d += 1;
    }
    let uniq: HashSet<i64> = ds.into_iter().collect();
    uniq
}

fn main() {
    input! {
        n: usize,
        a: [i64; n],
    }

    let mut cnt = vec![0; 1_000_001];
    cnt[1] = 1;

    for i in 0..a.len() {
        let primes = divisors(a[i]).into_iter().collect::<Vec<i64>>();
        for j in 0..primes.len() {
            if primes[j] == 1 {
                continue;
            }
            cnt[primes[j] as usize] += 1;
        }
    }
    // println!("{:?}", cnt);

    if cnt.iter().all(|&x| x == 0 || x == 1) {
        println!("pairwise coprime");
    } else if *cnt.iter().filter(|&x| *x >= 1).min().unwrap() == 1 {
        println!("setwise coprime");
    } else {
        println!("not coprime");
    }
}
