#include<bits/stdc++.h>
using namespace std;
using ll=int;
ll N;
ll a[1000005];
int main(){
  cin>>N;
  vector<ll>A(N);
  for(ll i=0;i<N;i++)
    scanf("%d",&A[i]);
  for(ll i=0;i<N;i++){
    ll x=A[i];
  for(ll j=2;j*j<=A[i];j++){
  if(x%j==0){
  a[j]++;while(x%j==0)x/=j;
  }
  }if(x!=1)a[x]++;
   }ll Max=0;
  for(ll i=2;i<=1000004;i++)
    if(Max<a[i])Max=a[i];
  if(Max<=1)
    cout<<"pairwise coprime"<<endl;
  else{
  ll g=A[0];
    for(ll i=1;i<N;i++)
      g=gcd(g,A[i]);
    if(g==1)
      cout<<"setwise coprime"<<endl;
    else
      cout<<"not coprime"<<endl;
  
  }
  return 0;
}
