#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
#define PI 3.14159265359
#define INF 1000100100//000000000
#define MOD 1000000007
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define P pair<int, int>
#define PP pair<P,P>
#define T tuple<int,int,int> 
using namespace std;

int main(){
  int n; cin >> n;
  vector<int> a(n);
  rep(i,n) cin >> a[i];
  vector<int> ps;
  for(int i=2; i<=1000; i++){
      bool c=true;
      for(int j=2; j<=sqrt(i); j++){
          if(i%j==0){
              c=false;
              break;
          }
      }
      if(c==true) ps.push_back(i);
  }
  bool ok=true;
  rep(j,ps.size()){
      int tmp=0;
      rep(i,n){
          if(a[i]%ps[j]==0) tmp++;
          if(tmp>1){
              ok=false;
              break;
          }
      }
  }

  if(ok==true){
      cout << "pairwise comprime" << endl;
      return 0;
  }

  int now=a[0];
  rep(i,n-1){
      now=gcd(now,a[i+1]);
  }
  if(now==1){
      cout << "setwise comprime" << endl;
      return 0;
  }
  cout << "not comprime" << endl;  

return 0;
}