#include <bits/stdc++.h>
#define int long long
typedef long long ll;
using namespace std;

const ll MAX = 1000005;
const ll INF = 1001001001;
const ll MOD = 1000000007;
const double PI=3.1415926535897932;

ll N, ans=0, tmp=0;
vector<ll> A, Nums;
string S;

ll GCD(ll a, ll b) {
    if (b == 0) return a;
    else return GCD(b, a % b);
}

signed main() {
    cin >> N;
    Nums.resize(MAX, 0);
    for(int i=0;i<N;i++) {
        ll a;
        cin >> a;
        A.push_back(a);
        Nums[a]++;
        tmp += a;
    }
	for(int i=2;i<=1000000;i++) {
		int x=0;
		for(int j=i;j<=1000000;j+=i) x+=Nums[j];
		if(x>=2) break;
        if(i==1000000) {
            cout<<"pairwise coprime"<<endl;
            return;
        }
	}	
    tmp = A[0];
    for(int i=1;i<N;i++) {
        tmp = GCD(tmp, A[i]);
    }
    if(tmp==1) {
        cout << "setwise coprime" << endl;
        return 0;
    }
    cout << "not coprime" << endl;
    return 0;
}