import * as fs from 'fs';

// main
function main(input: string[]) {
    // param
    var n: number = Number(input[0])
    var a: number[] = input[1].split(" ").map(x => Number(x));
    var ans;
    // 
    if (Math_gcdArray(a) != 1) {
        ans = "not coprime";
    } else {
        var pl = Math_primeList(1000000 / 2);
        var pf = a.map(x => Math_primeFactor(pl, x));
        var pfl1 = pf.reduce((x, y) => x.concat(y));
        var pfl2 = Array.from(new Set(pfl1));
        if (pfl1.length == pfl2.length) {
            ans = "pairwise coprime"
        } else {
            ans = "setwise coprime"
        }
    }
    console.log(ans);
}

// entrypoint
function entrypoint() {
    try {
        var input = fs.readFileSync("/dev/stdin", "utf8").trim().split("\n");
        console.debug = function () { };
        main(input);
    }
    catch (ex) {
        console.log("----");
        console.log("file='%s'", __filename.split("\\").slice(-1)[0]);
        console.log("----");
        const lines: string[] = [];
        // @ts-ignore
        const reader = require('readline').createInterface({
            // @ts-ignore
            input: process.stdin,
            // @ts-ignore
            output: process.stdout
        });
        reader.on('line', function (line: string) {
            lines.push(line);
        });
        reader.on('close', function () {
            input = lines;
            console.log("input=%o", input);
            console.time();
            console.log("----")
            main(input);
            console.log("----")
            console.timeEnd();
        });
    }
}
entrypoint();

// library
function Math_max(arr: number[]): number { return arr.reduce((x, y) => Math.max(x, y)); }
function Math_min(arr: number[]): number { return arr.reduce((x, y) => Math.min(x, y)); }
function Math_gcd(): number {
    var ans = arguments[0];
    var f = (a: number, b: number): number => b ? f(b, a % b) : a
    for (var i = 1; i < arguments.length; i++) {
        ans = f(ans, arguments[i]);
    }
    return ans
};
function Math_gcdArray(values: number[]): number {
    var ans = values[0];
    var f = (a: number, b: number): number => b ? f(b, a % b) : a
    for (var i = 1; i < values.length; i++) {
        ans = f(ans, values[i]);
    }
    return ans
};
function Math_lcm(): number {
    var a = arguments
    var g = (n: number, m: number): number => m ? g(m, n % m) : n
    var l = (n: number, m: number): number => n * m / g(n, m)
    var ans = a[0]
    for (var i = 1; i < a.length; i++) {
        ans = l(ans, a[i])
    }
    return ans
}
function Math_lcmArray(values: number[]): number {
    var a = values
    var g = (n: number, m: number): number => m ? g(m, n % m) : n
    var l = (n: number, m: number): number => n * m / g(n, m)
    var ans = a[0]
    for (var i = 1; i < a.length; i++) {
        ans = l(ans, a[i])
    }
    return ans
}
function Math_primeList(value: number): number[] {
    var ans = [];
    var arr = new Array(value).fill(0);
    for (var i = 2; i < value; i++) {
        for (var j = i; j < value; j += i) {
            if (arr[j] == 0) arr[j] = i;
        }
    }
    for (var i = 2; i < value; i++) {
        if (arr[i] == i) ans.push(i);
    }
    return ans;
}
function Math_primeFactor(pl: number[], value: number, opt_count: boolean = false): any[] {
    var ans: any[] = [];
    var valmax = value / 2;;
    for (var i = 0; i < pl.length; i++) {
        var prime = pl[i];
        if (valmax < prime) break;
        var count = 0;
        while (value % prime == 0) {
            value /= prime;
            count++;
        }
        if (count != 0) {
            if (opt_count) {
                ans.push([prime, count]);
            } else {
                ans.push(prime);
            }
        }
        if (value == 1) break;
    }
    return ans;
}
