
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<ll,ll>;
using vvll = vector<vector<ll>>;
using vll = vector<ll>;
const ll MOD=1000000007;

template<ll MOD> struct Fp {
    ll val;
    constexpr Fp(ll v = 0) noexcept : val(v % MOD) {
        if (val < 0) val += MOD;
    }
    constexpr ll getmod() { return MOD; }
    constexpr Fp operator - () const noexcept { //符号
        return val ? Fp(MOD - val) : Fp(0);
        //return val ? MOD - val : 0; これじゃだめ？
    }
    constexpr Fp operator + (const Fp& r) const noexcept { return Fp(this->val) += r; }//ここでthisなのは？->コピーコンストラクタが自動生成されているから ここでFp()なのは自身の値は変わらないから
    constexpr Fp operator - (const Fp& r) const noexcept { return Fp(this->val) -= r; }
    constexpr Fp operator * (const Fp& r) const noexcept { return Fp(this->val) *= r; }
    constexpr Fp operator / (const Fp& r) const noexcept { return Fp(this->val) /= r; }
    constexpr Fp& operator += (const Fp& r) noexcept {
        val += r.val;
        if (val >= MOD) val -= MOD;
        return *this;
    }
    constexpr Fp& operator -= (const Fp& r) noexcept {
        val -= r.val;
        if (val < 0) val += MOD;
        return *this;
    }
    constexpr Fp& operator *= (const Fp& r) noexcept {
        val = val * r.val % MOD;
        return *this;
    }
    constexpr Fp& operator /= (const Fp& r) noexcept {
        ll a = r.val, b = MOD, u = 1, v = 0;
        while (b) {
            ll t = a / b;
            a -= t * b; swap(a, b);
            u -= t * v; swap(u, v);
        }
        val = val * u % MOD;
        if (val < 0) val += MOD;
        return *this;
    }
    constexpr bool operator == (const Fp& r) const noexcept {
        return this->val == r.val;
    }
    constexpr bool operator != (const Fp& r) const noexcept {
        return this->val != r.val;
    }
    friend constexpr ostream& operator << (ostream &os, const Fp<MOD>& x) noexcept {
        return os << x.val;
    }
    friend constexpr Fp<MOD> modpow(const Fp<MOD> &a, ll n) noexcept {
        if (n == 0) return 1;
        auto t = modpow(a, n / 2);
        t = t * t;
        if (n & 1) t = t * a;//1bit目が1=奇数,1ならここは2になる。
        return t;
    }
};

using mint = Fp<MOD>;

ll GCD(ll a, ll b) {
    if (b == 0) return a;
    else return GCD(b, a % b);
}

ll LCM(ll a, ll b)
{
   return (a * b) / GCD(a, b);
}


template <class type> void inputVector(vector<type>& vec)
{
    for(ll i=0;i<vec.size();i++)
    {
        cin>>vec[i];
    }
}

bool isSetwise(vll vec)
{
    ll gcd = vec[0];
    for(ll i=1;i<vec.size();i++)
    {
        gcd=GCD(gcd,vec[i]);
        if(gcd==1)return true;
    }
    return false;
}

int main()
{
    ll N;
    cin>>N;
    vll A(N);
    inputVector(A);
    ll lcm = A[0];
    ll product = A[0];
    for(ll i=1;i<N;i++)
    {
       ll cur = LCM(lcm,A[i])%MOD;
       lcm = cur%MOD;
       product*=A[i]%MOD;
    }
    if(product==lcm) cout<<"pairwise coprime"<<endl;
    else if(isSetwise(A)) cout<<"setwise coprime"<<endl;
    else cout<<"not coprime"<<endl;
    return 0;
}