#![allow(clippy::needless_range_loop)]
#![allow(unused_macros)]
#![allow(dead_code)]
#![allow(unused_imports)]

use itertools::Itertools;
use proconio::input;
use proconio::marker::*;
use std::iter::FromIterator;
use num::integer;

fn main() {
    input! {
        a: [usize]
    }

    let mut primes = vec![2, 3, 5, 7, 11];
    'b: for i in 13..=999 {
        for &p in &primes {
            if i % p == 0 {
                continue 'b;
            }
        }
        primes.push(i);
    }

    let mut factor = std::collections::HashSet::new();

    let mut pw = true;

    'c: for &n in &a {
        for &p in &primes {
            if n % p == 0 {
                if factor.contains(&p) {
                    pw = false;
                    break 'c;
                } else {
                    factor.insert(p);
                }
            }
        }
    }

    let gcd = a.iter().copied().fold1(integer::gcd).unwrap();

    if pw {
        println!("pairwise coprime");
    } else if gcd == 1 {
        println!("setwise coprime");
    } else {
        println!("not coprime");
    }
}
