#include <bits/stdc++.h>
 
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
 
using namespace std;
 
typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> P;
 
constexpr int INF = 1e9;
constexpr int MOD = 1e9+7;

map<ll,int> prime(ll n) {
    map<ll,int> res;
    for(ll i = 2; i * i <= n; i++) {
        while(n % i == 0) {
            n /= i;
            res[i]++;
        }
    }
    if(n != 1) res[n]++;
    return res;
}

int main() {
    int n;
    cin >> n;
    vi a(n);
    rep(i,n) cin >> a[i];

    int flag = 1;
    map<ll,int> mp;
    for(int i = 0; i < n; i++){
        map<ll,int> mp1 = prime(a[i]);
        for(auto x : mp1){
            if(x.first == 1) continue;
            if(mp[x.first] == 1) flag = 0;
            mp[x.first] = 1;
        }
    }
    if(flag == 0){
        int aa = a[0];
        for(int i = 1; i < n; i++) aa = __gcd(aa,a[i]);
        if(aa == 1) flag = 2;
    }
    
    if(flag == 0) cout << "not coprime" << endl;
    else if (flag == 1) cout << "pairwise coprime" << endl;
    else cout << "setwise coprime" << endl;

	return 0;
}