#include<bits/stdc++.h>
using namespace std;
typedef int64_t ll;
vector<bool> fu(1e6+1,1);
bool nopair=0;

vector<bool> furui_bool2(int n) {
  vector<bool> fu(n + 1, 1);
  fu.at(0) = 0; fu.at(1) = 0;
  for (int i=2; i <= n/2 + 1; i++) {
    if (fu.at(i) == 1) {
      int j = 2 * i;
      while (j <= n) {
        fu.at(j) = 0;
        j += i;
      }
    }
  }
  return fu;
}

set<int> prime_fac(ll n) {
  ll sq = sqrt(n);
  set<int> pr;
  vector<bool> fu = furui_bool2(sq+2);
  for (int i=2; i <= sq; i++) {
    if (fu.at(i)) {
      while (n % i == 0) {
        n /= i;
        pr.insert(i);
      }
    }
  }
  if(n>1)pr.insert(n);
  return pr;
}

void furui_bool(int x) {
  set<int> out=prime_fac(x);
  for(auto y : out){
    if(fu.at(y) == 1) {
      fu.at(y)=0;
      int j = 2 * y;
        while (j <= 1e6+1) {
          if(fu.at(j)==1)fu.at(j) = 0;
          j += y;
      }
    }
    else{nopair=1;break;} 
  }
}

int main() {
  fu.at(0) = 0; fu.at(1) = 0;
  ll n;
  cin>>n;
  ll a[n];
  for(int i=0;i<n;i++)cin>>a[i];
  sort(a,a+n);
  ll wgcd=a[0];
  for(int i=0;i<n;i++)wgcd=gcd(wgcd,a[i]);
  for(int i=0;i<n;i++){
    if(a[i]>1)furui_bool(a[i]);
    if(nopair)break;
  }
  if(!nopair)cout<<"pairwise coprime"<<endl;
  else if(wgcd==1)cout<<"setwise coprime"<<endl;
  else cout<<"not coprime"<<endl;
}
