#include<bits/stdc++.h>
 
using namespace std;

#define ull unsigned long long
#define ll long long
#define MOD 1000000007
#define INF (ll)1e18
#define IINF (int)1e9
#define EPS 1e-9
/*
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    No personality
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*/
void solve(){
    ll n,x,ans=1;
    //string s,t;
    cin>>n;
    vector<ll> v;
	for(int i=0;i<n;i++){
		cin>>x;
        v.push_back(x);
        ans = ans*x; 
	}
	int f=0;
    for(int i=0;i<n;i++){
        ll tem = ans/v[i];
        if(__gcd(tem,v[i])!=1){
            f=1;
            break;
        }
    }
    ans = v[0];
    if(f==0){ cout<<"pairwise coprime"; return; }
    for(int i=0;i<n;i++){
        ans = __gcd(ans,v[i]);
    }
    if(ans==1) cout<<"setwise coprime";
    else cout<<"not coprime";
    
}
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    solve();
    return 0;
}