#include <bits/stdc++.h>
#define REP(i,n) for (int i = 0; i <(n); ++i)
#define REP2(i,x,n) for (int i = x; i <(n); ++i)
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
using namespace std;
using ll = long long;
using P = pair<int,int>;
static const double PI = acos(-1);
static const int INF = 1e9+7;
//debug 
#ifdef _DEBUG
#define debug(var)  do{cout << #var << " :";view(var);}while(0)
#else
#define debug(...)
#endif
template<typename T> void view(T e){cout << e << endl;}
template<typename T> void view(const vector<T>& v){for(const auto& e : v){ cout << e << " "; } cout << endl;}
template<typename T> void view(const vector<vector<T> >& vv){ for(const auto& v : vv){ view(v); } }


int main(){
  int n;
  cin >> n;
  vector<int> a(n);
  REP(i,n) cin >> a[i];
  
  bool gcd1 = true;
  REP(i,n-1){
    if(__gcd(a[i],a[i+1]) != 1) gcd1 = false;
  }
  if(gcd1){
    cout << "pairwise coprime" << endl;
    return 0;
  }

  int gcdst = a[0];
  REP2(i,1, n){
    gcdst = __gcd(gcdst,a[i]);
  }
  if(gcdst == 1) cout << "setwise coprime" << endl;
  else cout << "not coprime" << endl;

  return 0;
}