#include<bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
#define pb push_back
using namespace std;
typedef long long ll;

const int INF = 1e9;
struct Eratos{
    vector<bool> is_prime;
    vector<int> P;
    vector<int> min_prime;

    Eratos(int N) : is_prime(N + 1, true), min_prime(N + 1, INF){
        for(int i = 2; i <= N; i++){
            if(is_prime[i]){
                for(int j = 2 * i; j <= N; j += i)
                    is_prime[j] = false;
                P.pb(i);
            }
        }
    };
};

int main(){
    int n;
    cin >> n;
    vector<int> a(n);
    rep(i, n)
        cin >> a[i];
    Eratos er(1000002);

    vector<int> s(1000002, 0);
    int judge1 = 1;
    int judge2 = 1;
    rep (i,n){
        for (int j;er.P[j] < 1000; j++){
            if (a[i] % er.P[j] == 0 )//&& er.P[j] * er.P[j] <= a[i]){
            //    int x = a[i] / er.P[j];
                if (s[er.P[j]] )//|| s[x])
                    judge1 = 0;
                s[er.P[j]]++;
            //    if (er.is_prime[x]){
              //      if (er.P[j] < x)
                //        s[x]++;
               // }
                if (s[er.P[j]] == n)// || s[x] == n)
                    judge2 = 0;
            }
        }
    }
    if (judge1)
        cout << "pairwise coprime" << endl;
    else if (judge2)
        cout << "setwise coprime" << endl;
    else cout << "not coprime" << endl;
}
