#include <bits/stdc++.h>
using namespace std;
#define SPEED ios::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define int long long
#define ld long double
#define fi first
#define se second
#define all(uiet) uiet.begin(),uiet.end()
#define read(UIET) for(int i = 0; i < n; ++i) cin >> UIET[i]
#define out(UIET) for(int i = 0; i < n; ++i) cout << UIET[i]
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define vpp vector<pair< int, int > >
#define pll pair<int , int >
#define ppll pair < pll , pll >
#define debug(n1) cout << n1 << endl
#define len(a) ((int) (a).size())
#define endl "\n"
#define mod 1000000007
const int INF = (1LL<<60)-1;
const int maxN = 1000001;
bool prime[maxN + 1];
void seive(){
    memset(prime, true, sizeof(prime));
    for(int i = 2; i * i <= maxN; ++i){
        if(prime[i]){
            for(int j = i * i; j <= maxN; j += i){
                prime[j] = false;
            }
        }
    }
}
int32_t main(){
    SPEED;
    seive();
    int n;
    cin >> n;
    int arr[n];
    int even = 0, odd = 0;
    int agcd = 0, pcnt = 0;
    for(int i = 0; i < n; ++i){
        cin >> arr[i];
        if(prime[arr[i]]) pcnt++;
        agcd = __gcd(agcd, arr[i]);
        if(arr[i] % 2 == 0) even++;
        else odd++;
    }
    if(even > 1){
        if(agcd == 1){
            cout << "setwise coprime" << endl;
        }
        else cout << "not coprime" << endl;
    }
    else{
        int chk = 0;
        for(int i = 0; i < n; ++i){
            if(__gcd(arr[0], arr[i]) > 1){
                chk = 1;
                break;
            }
        }
        if(chk == 0){
            cout << "pairwise coprime" << endl;
        }
        else if(agcd == 1) cout << "setwise coprime" << endl;
        else cout << "not coprime" << endl;
    }
}
