#include <bits/stdc++.h>
using namespace std;
#define ll unsigned long long
#define pb push_back
#define NUM 1000000007
#define MAX 100001
#define INF LLONG_MAX
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    ll n,tmp;
    cin>>n;
    vector<ll> v;
    for(int i=0;i<n;i++){
        cin>>tmp;
        v.pb(tmp);
    }
    vector<ll> suf(n+1);
    suf[n-1]=v[n-1];
    for(int i=n-2;i>=0;i--){
        suf[i]=(ll)__gcd(suf[i+1],v[i]);
    }
    int flag=0;
    for(int i=0;i<n-1;i++){
        if(suf[i]!=1){
            flag=1;
            break;
        }
    }
    if(flag==0)
        cout<<"pairwise coprime"<<endl;
    else if(suf[0]==1)
        cout<<"setwise coprime"<<endl;
    else
        cout<<"not coprime"<<endl;
    return 0;
}
