#include <bits/stdc++.h>

#define ll long long
#define ii pair<ll, ll>
#define vi vector<int>
#define vl vector<ll>
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define mt make_tuple
#define ff first
#define ss second
#define pi 3.14159265
#define oo 1000000007
#define loo 0x7fffffffffffffff

#define prime 1000000007

#define W(x) cerr << "\033[31m" << #x << " = " << x << "\033[0m" << "\n";
using namespace std;

int da[1000001];
vi d[1000001];

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    for (int i = 2; i < 1000001; ++i){
        if(d[i].empty()){
            for (int j = i; j < 1000001; j+=i){
                d[j].pb(i);
            }
        }
    }
    set<int> yo;
    int n; cin >> n;
    int g;
    vi v(n);
    int f = 0;
    for (int i = 0; i < n; ++i){
        cin >> v[i];
        if(yo.find(v[i]) == yo.end()) yo.insert(v[i]);
        else f = 1;
        if(!i) g = v[i];
        else g = __gcd(g, v[i]);
    }
    if(g > 1 || f){
        cout << "not coprime\n";
    }else{
        if(n > 78498){
            cout << "setwise coprime\n";
        }else{
            for (int i = 0; i < n; ++i){
                for(auto l : d[v[i]]){
                    if(da[l]){
                        cout << "setwise coprime\n";
                        return 0;
                    }else da[l] = 1;
                }
            }

            cout << "pairwise coprime\n";
        }
    }


    return 0;
}