// Vicfred
// https://atcoder.jp/contests/abc177/tasks/abc177_e
// math
import std.stdio, std.algorithm, std.range, std.functional;
import std.array;
import std.conv;
import std.container;
import std.numeric;
import std.string;

uint[] sieve(in uint limit) nothrow @safe {
    if (limit < 2)
        return [];
    auto composite = new bool[limit];

    foreach (immutable uint n; 2 .. cast(uint)(limit ^^ 0.5) + 1)
        if (!composite[n])
            for (uint k = n * n; k < limit; k += n)
                composite[k] = true;

    //return iota(2, limit).filter!(not!composite).array;
    return iota(2, limit).filter!(i => !composite[i]).array;
}

void main() {
    auto primes = (10^^5).sieve;

    long[uint] visited;

    long n = readln.chomp.to!long;
    long[] a = readln.split.map!(to!long).array;

    long factor = a[0];
    foreach(number; a)
        factor = gcd(factor,number);

    bool flag = false;
    foreach(number; a) {
        foreach(prime; primes) {
            if(prime > number)
                break;
            if(number%prime == 0) {
                if(prime in visited) {
                    flag = true;
                } else {
                    visited[prime] = 1;
                }
            }
        }
    }

    if(!flag) {
        "pairwise coprime".writeln;
        return;
    }

    if(flag && factor != 1) {
        "not coprime".writeln;
        return;
    }

    if(factor == 1) {
        "setwise coprime".writeln;
    }
}

