

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
const ll N = 1e6+1;
vector<int>adj[N],adj1[N];
vector<pair<int,int>>v;
map<pair<int,int>,int>mp;
bool visited[N];
int height[N],val[N],grid[55][55];

void solve(){
 int n;
 cin>>n;
 int a[n],f=0,g=0;
 map<int,int>mp;
 for(int i=0;i<n;i++){
    cin>>a[i];
    mp[a[i]]++;
    if(mp[a[i]]>1)f=1;
 }
 int gc=a[0];
 for(int i=1;i<n;i++){
    gc=__gcd(gc,a[i]);
 }
 if(gc>1)g=1;

 if(f==1){
    if(g==0)cout<<"setwise coprime";
    else cout<<"not coprime";
    return ;
 }
 int c;
 for(int i=2;i<=1000000;i++){
    if(!visited[i]){
         c=0;
        for(int j=i;j<=1000000;j+=i){
            if(!visited[j]){
                visited[j]=true;
                if(mp[j])c++;
            }
        }
      if(c>1){
        if(g==0)cout<<"setwise coprime";
        else cout<<"not coprime";
        return ;
      }
    }
 }
 if(c==0)cout<<"pairwise coprime";
}
int main(){
    int t=1;
    //cin>>t;
   while(t--)solve();
}
