#![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;

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 nfactor = std::collections::HashSet::new();

    for &p in &primes {
        if a[0] % p == 0 {
            nfactor.insert(p);
        }
    }

    let mut pw = true;

    for &n in &a {
        for &p in &primes {
            if n % p == 0 {
                if factor.contains(&p) {
                    pw = false;
                } else {
                    factor.insert(p);
                }
            } else {
                nfactor.remove(&p);
            }
        }
    }

    if pw {
        println!("pairwise coprime");
    } else if nfactor.is_empty() {
        println!("setwise coprime");
    } else {
        println!("not coprime");
    }
}
