#include <iostream>
#include <fstream>
#include <vector>
#include <cstring>
#include <queue>
#include <algorithm> // sort
#include <math.h>
#include <map>
#include <set>

#define DEBUG 0

#define REP(i, n) for (long long i = 0; i < (n); i++) 
typedef long long ll;
static const ll MOD = 1000000007;
static const ll INF = 1000000000000000000LL;
                    //999999997000000003
                    //1000000000000000000

using namespace std;

ll euclidean_gcd(ll a, ll b) {
  if(a < b) return euclidean_gcd(b, a);
  ll r;
  while ((r=a%b)) {
    a = b;
    b = r;
  }
  return b; //あまりが0ならそれが、最大公約数
}

int solve(){

    string pc = "pairwise coprime";
    string sc = "setwise coprime";
    string nc = "not coprime";
    ll N;
    cin >> N;
    vector <ll> a;
    cnt = 
    REP(i,N)
    {
        ll tmp;
        cin >> tmp;
        if(tmp == 1)
        {
            ++cnt;
            continue;
        }
        a.push_back(tmp);
    }

    N -= cnt;
    if(N <= 1)
    {
        cout << pc << endl;
        return 0;
    }

    //すべての1 <= i < j <= Nにおいて GCD(Ai,Aj) = 1;
    //どのペアも素数同士

    //2以上を分割していく?

    //全部試してみる
    bool pcFlg = true;

    //28, 40 → 2
    // 5, 7 , 9, 


    for(int i = 0; i < N-1; ++i)
    {
        for(int j = i+1; j < N; ++j)
        {
            ll g;
            g = euclidean_gcd(a[i],a[j]);
            if(g != 1)
            {
                pcFlg = false;
                break;
            }
        }
    }

    if(pcFlg)
    {
        cout << pc << endl;
        return 0;
    }

    ll gc = euclidean_gcd(a[0],a[1]);

    for(int i = 2; i < N; ++i)
    {
        gc = euclidean_gcd(gc,a[i]);
    }

    if(gc == 1)
    {
        cout << sc << endl;
        return 0;
    }

    cout << nc << endl;
    return 0;
}

int main()
{
    solve();
    return 0;
}
