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

const int N=1e6+100;
const int mod=1e9+7;
typedef long long ll;


int prime[N];
bool vis[N];
int cnt;

int tong[N];
int su[N], x[N];;
void work()
{
    for(int i=2;i<=N;i++){
        if(!vis[i])  prime[++cnt]=i;
        for(int j=1;i*prime[j]<=N ;j++ ){
            vis[i*prime[j]]=1;
            if(i%prime[j]==0) break;
        }
    }
}

int main()
{
    ios::sync_with_stdio(0);cin.tie(0);

    work();
    /*for(int i=1;i<=100;i++){
        cout<<prime[i]<<" ";
    }*/
   // cout<<cnt<<endl;

   int n;cin>>n;

   for(int i=1;i<=n;i++){
      cin>>x[i];
      tong[x[i]]++;
   }

   for(int i=1;i<=cnt;i++){
     for(int j=prime[i];j<=N-100;j+=prime[i]){
        if(tong[j]){
            su[prime[i]]+=tong[j];
        }
     }
   }
   int ma=0;
   for(int i=1;i<=N-100;i++){
     ma=max(ma,su[i]);
   }
   int kk=x[1];
   if(ma==1)  cout<<"pairwise coprime"<<endl;
   else{
      for(int i=2;i<=N-100;i++){
         kk=__gcd(kk,x[i]);
         if(kk==1) break;
      }
      if(kk==1){
        cout<<"setwise coprime"<<endl;
      }
      else{
        cout<<"not coprime"<<endl;
      }
   }
    return 0;
}
