#include <bits/stdc++.h> 
using namespace std; 
# define rep(i,n) for(int i=0;i<n;++i)
# define gcd __gcd

const int N=1e6+5;
int cnt[N];

int main(){   
  int n;
  cin>>n;
  int a[n];
  int g=0;
  rep(i,n){
    cin>>a[i];
    g=gcd(g,a[i]);
  }
  if(g>1){
      cout<<"not coprime";
      return;
  }
  bool ok=1;
  for(int i=0;i<n;i++){
    for(int j=2;j*j<=a[i];j++){
      if(a[i]%j==0 && cnt[j]){
        ok=0;
        break;
      }
      while(a[i]%j==0){
        a[i]/=j;
        cnt[j]=1;
      }
    }
    if(a[i]>1)cnt[a[i]]=1;
  }
  if(ok){
    cout<<"pairwise comprime";
  }
  else{
    cout<<"setwise comprime";
  }
}