#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
typedef pair<int,int> P;
typedef long long ll;
const int INF = 1001001001;
const ll INFL = 1e17;
const int MOD = 1e9+7;


int main(){
    int n;
    cin >> n;
    vector<int> a(n);
    rep(i,n) cin >> a[i];
    int gcd = 0;
    for(int i=0; i<n; i++){
        gcd = __gcd(a[i],gcd);
    }
    if(gcd!=1){
        cout << "not coprime" << endl;
        return 0;
    }
    
    vector<bool> check(2000001,true);
    for(int i=2; i<1000001; i++){
        if(check[i]){
            int now = 2;
            while(i*now < 1000001){
                check[i*now] = false;
                now++;
            }
        }
    }
    vector<int> prime;
    for(int i=2; i<1000001; i++){
        if(check[i]) prime.push_back(i);
    }

    sort(a.begin(),a.end());
    for(int i=0; i<int(prime.size()); i++){
        int now = 0;
        for(int j=0; j<n; j++){
            if(a[j]%prime[i]==0) now++;
        }
        if(now >= 2){
            cout << "setwise coprime" << endl;
            return 0;
        }
    }
    cout << "pairwise coprime" << endl;

    return 0;
}