#include<bits/stdc++.h>
//#pragma GCC optimize("Ofast")
//#pragma GCC target("avx,avx2,fma")

using namespace std;

typedef long long ll;

//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
//typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>pb_ds;

#define IN freopen("in.txt","r",stdin)
#define OUT freopen("out.txt","w",stdout)
#define pi pair<int,int>
#define F first
#define S second
#define pb push_back
#define pp pop_back
#define mod 1000000007
#define pai acos(-1)
#define N 1000000

map<int,int>mp;
int prime[N+5],ar[N+5];

void sieve(){
   for(int i=1;i<=N;i++) prime[i]=i;
   for(int i=2;i<=N;i++){
      if(prime[i]==i){
         for(int j=i+i;j<=N;j+=i) prime[j]=i;
      }
   }
   return ;
}

int main ()
{
   ios_base::sync_with_stdio(false);
   cin.tie(NULL);
   sieve();
   int n;cin>>n;
   int gc=0;
   for(int i=1;i<=n;i++){
      cin>>ar[i];
      gc=__gcd(gc,ar[i]);
   }
   for(int i=1;i<=n;i++){
      while(ar[i]>1){
         int p=prime[ar[i]];
         while(ar[i]%p==0) ar[i]/=p;
         mp[p]++;
      }
   }
   int mx=0;
   for(auto tp:mp){
      mx=max(tp.S,mx);
   }
   if(mx==1) cout<<"pairwise coprime\n";
   else if(gc==1) cout<<"setwise coprime\n";
   else cout<<"not coprime\n";
   return 0;
}

