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

int main(){
  int N;
  cin>>N;
  int A[1000010];
  int ans=0;
  int temp=0;
  map<int,int>mp;
  for(int i=0;i<N;i++){
    cin>>A[i];
    ans=gcd(ans,A[i]);
    temp=A[i];
    for(int j=2;j*j<=A[i];j++){
      if(temp%j==0){
        mp[j]++;
      }
    }  
  }
  int flag=1;
  for(auto itr=mp.begin();itr != mp.end();itr++){
    if(itr->second >1){
      flag=0;
    }
  }
  if(flag){
    cout<<"pairwise coprime"<<endl;
    return 0;
  }
  
  if(ans==1){
    cout<<"setwise coprime"<<endl;
    return 0;
  }
  cout<<"not coprime"<<endl;
  return 0;
}



 