#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];
    mp[A[i]]++;
    ans=gcd(ans,A[i]);
  }
  if(ans > 1){
    cout<<"not coprime"<<endl;
    return 0;
  }
  int flag=1;
  for(int i=0;i<N;i++){
    temp=A[i];
    if(temp%2==0){
      mp[2]++;
      mp[temp/2]++;
    }
    for(int j=3;j*j<=A[i];j=j+2){
      if(temp%j==0){
        mp[j]++;
        mp[temp/j]++;
        if(mp[j]>1||mp[2]>1){
          flag=0;
          break;
        }
      }
    }
    if(flag !=1){
      break;
    }
  }
  
  /*for(auto itr=mp.begin();itr != mp.end();itr++){
    cout<<itr->first<<" "<<itr->second<<endl;
  }*/
  
  if(flag){
    cout<<"pairwise coprime"<<endl;
    return 0;
  }
  else{
    cout<<"setwise coprime"<<endl;
    return 0;
  }
  
  return 0;
}



 