#include<bits/stdc++.h>
using namespace std;
#define ull unsigned long long int
#define ll long long int
#define ld long double
#define pb push_back 
#define ff first 
#define ss second
#define all(c) c.begin(), c.end()
#define sz(z) (int)z.size()
#define rep(i,a,b) for(int i=a; i<b; ++i)
#define rev(i,a,b) for(int i=a; i>=b; i--)
//Debugging tools 
#define debug(v) cout<<#v<<endl;for(ll i=0; i<v.size(); i++) cout<<v[i]<<" "; cout<<endl;
#define debugn(v,n) cout<<#v<<endl;for(ll i=0; i<n; i++) cout<<v[i]<<" "; cout<<endl;
#define deb(sum) cout<<#sum<<" = "<<sum<<endl;
//Predefined values
#define INF (ll)1e18
#define endl "\n"
#define pi 3.142857142857143

const ll MOD = 1e9 + 7;

int main() { 
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    #ifndef ONLINE_JUDGE
        freopen("input.in","r",stdin);
        freopen("output.in","w",stdout);
    #endif
    int t=1;    
    //cin>>t;
    while(t--){
        int n;
        cin>>n;
        vector<int>a(n);
        rep(i,0,n) cin>>a[i];
        sort(all(a));
        vector<int> d(1005);
        for(int i=2; i*i<1005; i++){
            if(!d[i]){
                for(int j=i*i; j<1005; j+=i){
                    d[j] = 1;
                }
            }
        }
        vector<int> prime;
        rep(i,2,1005){
            if(!d[i])
                prime.push_back(i);
        }
        //rep(i,0,10) cout<<prime[i]<<' '; cout<<endl;
        //deb(sz(prime)); 
        int ok=1;
        int g = a[0];
        map<int, int> cnt;
        rep(i,0,n){
            g = __gcd(g,a[i]);
            rep(j,0,sz(prime)){
                if(a[i]%prime[j]==0){
                    cnt[prime[j]]++;
                    if(cnt[prime[j]]>1){
                        ok = 0;
                        break;
                    }
                }
            }
            
        }

        if(ok)
            cout<<"pairwise coprime"<<endl;
        else{
            if(g==1)
                cout<<"setwise coprime"<<endl;
            else
                cout<<"not coprime"<<endl;
        }
    }
  return 0;
 }















