(async () => {
    let input = '';
    for await (const chunk of process.stdin) input += chunk;
    let values = input.split(/\s/).map(v => +v);

    const n = values.shift();
    values = values.slice(0, n);
    const max = values.reduce((a, b) => Math.max(a, b), 0);

    let prims = new Array(max);
    for(let i = 2; i <= max; i++){
        const prim = prims.find((prim) => i % prim === 0)
        if(prim == undefined){
            prims.push(i);
        }else{
            prims.push(prim);
        }
    }

    const gcd = (a, b) => b ? gcd(b, a % b) : a;
    let gcd_ = values[0];
    for (let i = 0; i < values.length; i++) {
        if(prims[values[i] + 2] == -1){
            console.log('pairwise coprime');
            return;
        }
        prims[values[i] + 2] = -1;
        gcd_ = gcd(gcd_, values[i]);
        if(gcd_ === 1){
            console.log('setwise coprime');
        }
    }
    console.log('not coprime');
})();
