import std.stdio, std.conv, std.string, std.array, std.range, std.algorithm, std.container;
import std.math, std.random, std.bigint, std.datetime, std.format;
bool DEBUG = 0; void log(A ...)(lazy A a){ if(DEBUG) print(a); }
void main(string[] args){ args ~= ["", ""]; string cmd = args[1]; if(cmd == "-debug") DEBUG = 1;
if(cmd == "-gen") gen; else if(cmd == "-jury") jury; else solve; } 
void print(){ writeln(""); } void print(T)(T t){ writeln(t); } void print(T, A ...)(T t, A a){ std.stdio.write(t, " "), print(a); }
string unsplit(T)(T xs){ return xs.array.to!(string[]).join(" "); }
string scan(){ static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res; }
T scan(T)(){ return scan.to!T; } T[] scan(T)(int n){ return n.iota.map!(i => scan!T()).array; }
T lowerTo(T)(ref T x, T y){ if(x > y) x = y; return x; } T raiseTo(T)(ref T x, T y){ if(x < y) x = y; return x; }

// ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- //
void gen(){
}
void jury(){
}
void solve(){
    int n = scan!int;
    long[] as = scan!long(n);

    long tmp = as[0];
    foreach(a; as) tmp = gcd(tmp, a);
    if(tmp > 1){
        "not coprime".writeln;
        return;
    }

    auto f = new Factorizer(1_000_009);
    bool[] us = new bool[1_000_009];
    foreach(a; as) foreach(p; f(a, 0)) if(us[p]){
        log("a:", a, "p:", p, "us:", us[0 .. 20].to!(int[]));
        "setwise coprime".writeln;
        return;
    }
    else us[p] = 1, log("a:", a, "p:", p, "us:", us[0 .. 20].to!(int[]));

    "pairwise coprime".writeln;

}


/// 最大公約数。最大の公約数。
/// 例 gcd(12, -18) = 6, gcd(-12, -18) = 6, gcd(12, 0) = 12, gcd(0, 0) = 0
/// ※本当は gcd(0, 0) は存在しないが便宜上 0 を返している
long gcd(long a, long b){
	if(a < 0) a = -a;
	if(b == 0) return a;
	if(b < 0) return gcd(a, -b);
	if(a % b == 0) return b;
	if(a < b) return gcd(b, a);
	else return gcd(b, a % b);
}

// n 以下の自然数を素因数分解する
// 準備に O(m^2) ただし m は素数の個数（=O(log n) ）
// 1回の実行に O(log a) ただし a は引数
class Factorizer{
    long[] ds; // ds[i]: i を割り切る最小の素数
    this(long n){
        ds = new long[](n + 1);
        foreach(i; 0 .. n + 1) ds[i] = i;
        foreach(i; 2 .. n + 1){
            if(ds[i] < i) continue;
            for(long u = i * 2; u <= n; u += i) if(ds[u] > i) ds[u] = i;
        }
    }

    // 素因数分解（重複度に応じる 例：f(12) = [2, 2, 3]）
    long[] opCall(long a){
        long[] res;
        while(a > 1) res ~= ds[a], a /= ds[a];
        return res;
    }

    // 素数の約数の列挙（重複度は無視 例：f(12, 0) = [2, 3]）
    long[] opCall(long a, bool canDuplicate){
        if(canDuplicate) return opCall(a);
        long[] res;
        while(a > 1){
            if(res.length == 0 || res[$ - 1] < ds[a]) res ~= ds[a];
            a /= ds[a];
        }
        return res;
    }

}