#![allow(non_snake_case)]

fn main() {
    let stdin = std::io::stdin();
    let mut stdin = my::io::InputReader::new(stdin.lock());
    let stdout = std::io::stdout();
    let mut out = std::io::BufWriter::new(stdout.lock());

    const A_MAX: usize = 1000000;

    let mut min_factor = [1; A_MAX + 1];
    // q[n] = i where n = i * p^e, p = min_factor[n], p does not divide i. + 1);
    let mut q = [1; A_MAX + 1];
    let mut primes = Vec::new();
    for i in 2..=A_MAX {
        min_factor[i] = i;
    }
    for i in 2..A_MAX {
        if min_factor[i] == i {
            primes.push(i);
        }
        for &p in &primes {
            let n = i * p;
            if n > A_MAX {
                break;
            }
            min_factor[n] = p;
            if p == min_factor[i] {
                q[n] = q[i];
                break;
            } else {
                q[n] = i;
            }
        }
    }

    let N: usize = stdin.read();
    let mut a = [0; A_MAX + 1];
    for _ in 0..N {
        let A: usize = stdin.read();
        a[A] += 1;
    }

    let mut is_pairwise_coprime = true;
    for n in (2..=A_MAX).rev() {
        if a[n] > 1 {
            if a[n] == N {
                writeln!("not coprime");
                return;
            }
            is_pairwise_coprime = false;
        }
        a[min_factor[n]] += a[n];
        a[q[n]] += a[n];
    }
    if is_pairwise_coprime {
        println!("pairwise coprime");
    } else {
        println!("setwise coprime");
    }
}

#[allow(unused_must_use)]
mod my {
    pub mod io {
        use std::io::{BufRead, ErrorKind, Result};
        use std::str::{FromStr, from_utf8};
        use std::fmt::Debug;

        pub fn read_word<R: BufRead>(r: &mut R, buf: &mut Vec<u8>)
                                              -> Result<usize> {
            let mut read = 0;
            loop {
                let (done, used) = {
                    let available = match r.fill_buf() {
                        Ok(n) => n,
                        Err(ref e) if e.kind() == ErrorKind::Interrupted => continue,
                        Err(e) => return Err(e)
                    };
                    match available.iter().position(|&x| x == b'\n' || x == b' ') {
                        Some(i) => {
                            buf.extend_from_slice(&available[..i]);
                            (true, i + 1)
                        }
                        None => {
                            buf.extend_from_slice(available);
                            (false, available.len())
                        }
                    }
                };
                r.consume(used);
                read += used;
                if done || used == 0 {
                    return Ok(read);
                }
            }
        }

        pub struct InputReader<R: BufRead> {
            reader: R,
            buf: Vec<u8>,
        }

        impl<R: BufRead> InputReader<R> {
            pub fn new(reader: R) -> InputReader<R> {
                InputReader {
                    reader: reader,
                    buf: Vec::<u8>::new(),
                }
            }

            pub fn read_word(&mut self) {
                read_word(&mut self.reader, &mut self.buf);
            }
            
            pub fn read<T>(&mut self) -> T
                where T: FromStr,
                      T::Err: Debug
            {
                self.buf.clear();
                self.read_word();
                from_utf8(&self.buf).unwrap().trim().parse().unwrap()
            }
        }
    }
}

