#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bitset>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<deque>
#include<list>
#include<iomanip>
#include<cmath>
#include<cstring>
#include<functional>
#include<cstdio>
#include<cstdlib>
#include<numeric>
using namespace std;

#define repr(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rep(i, n) repr(i, 0, n)
#define INF 2e9
#define MOD 1000000007
//#define MOD 998244353
#define LINF (long long)4e18
#define jck 3.141592

const double EPS = 1e-10;

using ll = long long;
using Pi = pair<int,int>;
using Pl = pair<ll,ll>;

int main(){
    int n; cin >> n;
    vector<int> a(n);
    rep(i,n) cin >> a[i];
    vector<int> cnt(1000001);
    rep(i,n){
        cnt[a[i]]++;
    }
    bool ok = true;
    repr(i,2,1000001){
        int now = i;
        int cnt2 = 1;
        while(now*cnt2 <= 1000000){
            if(cnt[now*cnt2]) ok = false;
            cnt2++;
        }
    }
    if(ok){
        cout << "pairwise coprime" << endl;
        return 0;
    }
    int now = a[0];
    rep(i,n) now = gcd(now,a[i]);
    if(now == 1){
        cout << "setwise coprime" << endl;
        return 0;
    }
    cout << "not coprime" << endl;


}

