#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)//iをaからn
#define per(i,a,n) for (int i=a-1;i>=n;i--)//iをnからa
#define db(x) cout << #x << " = " << x << endl
#define db2(x, y) cout << "(" << #x << ", " << #y << ") = (" << x << ", " << y << ")\n"; //デバッグ用
#define all(x) (x).begin(), (x).end()
#define INF 1000000000000 //10^12:∞
#define MOD 1000000007 //10^9+7:合同式の法

int main() {
  int N;
  cin >> N;
  vector<int> sosuu;
  vector<int> a(N);
  set<int> gcdnum;
  set<int> tyouhuku;
  bool flag;
  rep(i,2,10000){
      flag=true;
      rep(j,0,sosuu.size()){
          if(i%sosuu.at(j)==0){
              flag=false;
              break;
          }
      }
    if(flag){
    sosuu.push_back(i);
   // db2(i,sosuu.size());
    }
  }
 
  
  int allgcd=0;
  int num;
  rep(i,0,N){
      cin >> a.at(i);
  if(i==0){
      allgcd=a.at(i);
  }else{
      allgcd=gcd(allgcd,a.at(i));
  }
  tyouhuku.insert(a.at(i));
  }
  bool flag2=true;
  
if(allgcd!=1){
    cout<<"not coprime"<<endl;
}else{
    rep(i,0,N){
        num=a.at(i);
        rep(j,0,sosuu.size()){
            if(num%sosuu.at(j)==0){
                if(gcdnum.find(sosuu.at(j))==gcdnum.end()){
                    gcdnum.insert(sosuu.at(j));
                }else{
                    flag2=false;
                }
            }
        }
        if(flag2==false){
            break;
        }
    }
    if(flag2==false){
            cout<<"setwise coprime"<<endl;
        }else{
            cout<<"pairwise coprime"<<endl;
        }
}
  
 return 0;
}