#include<bits/stdc++.h>
using namespace std;
using ll = long long;
const int MOD = 1e9+7;

int main(){
  
  vector<int> p(1000000,-1);
  int n; cin>>n;
  vector<int> a(n);
  for(auto &i:a){
    cin>>i;
  }
  int g = a.at(0);
  for(int i=0; i<n; i++){
    g = gcd(g,a.at(i));
  }
  if(g!=1){
    cout << "not coprime"<<endl;
    return 0;
  }
  
  for(int i=0; i<n; i++){
    ll k = 2;
    while(1){
      if(a.at(i)%k==0){
        a.at(i)/=k;
        if(p.at(k)!=i && p.at(k)!=-1){
          cout<<"setwise coprime"<<endl;
          return 0;
        }
        else {
          p.at(k)=i;
          break;
        }
      }
      else k++;
      
      if(a.at(i)==1){
        break;
      }
      if(a.at(i)<k*k){
        if(p.at(a.at(i))!=-1 && p.at(a.at(i))!=i){
          cout<<"setwise coprime"<<endl;
          return 0;
        }
        else{
          p.at(a.at(i))=i;
          break;
        }
      }
    }
  }
  cout <<"pairwise coprime"<<endl;
  
}
