#![allow(non_snake_case,unused_imports,dead_code)]
use std::str::FromStr;
use std::collections::{HashMap,HashSet,VecDeque,BinaryHeap};
use std::cmp::{max,min,Reverse,Ordering};
use std::time::{Duration, Instant};
use rand::Rng;
 
use proconio::input;
use proconio::marker::{Chars,Usize1,Isize1};

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

    let mut all_gcd = A[0];
    for &a in &A[1..]{
        all_gcd = gcd(all_gcd,a);
    }
    if all_gcd != 1{
        println!("not coprime");
        return;
    }

    let mut primes = HashSet::new();
    for &a in &A{
        let f = factor(a);
        if !primes.is_disjoint(&f){
            println!("setwise coprime");
            return;
        }
        primes = primes.union(&f).map(|a| *a).collect::<HashSet<_>>();
    }

    println!("pairwise coprime");

}

fn gcd(x:usize,y:usize) -> usize{
    if y==0{return x;}
    gcd(y,x%y)
}

fn factor(n:usize) -> HashSet<usize>{
    let mut ret = HashSet::new();
    let mut n = n;
    for i in 2..n{
        if i > n*n{break;}
        if n%i == 0{
            ret.insert(i);
            while n%i != 0{
                n /= i;
            }
        }
    }
    ret
}