#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <bitset>
#include <queue>
typedef long long ll;
#define rep(i,n) for(int i = 0;i<n;++i)
#define repc(bit,k,n) for (int bit = (1<<k)-1;bit < (1<<n); bit = next_combination(bit))
#define repi(itr,vec) for(auto itr = vec.begin();itr!=vec.end();++itr)
using namespace std;
using Graph = vector<vector<int> >;

/* next combination
 * usage:repc(bit,k,n)
 * */
inline int next_combination(int sub) {
  int x = sub & -sub, y = sub + x;
  return (((sub & ~y) / x) >> 1) | y;
}

/* uniq
 * usage:uniq(vec)
 * */
void uniq(vector<int> &vec){
  sort(vec.begin(), vec.end());
  vec.erase(unique(vec.begin(), vec.end()), vec.end());
  return;
}

/* BinaryIndexedTree
 * usage:update and sum of 1~N
 * */
int N;
int bit[1000010];
void add(int a, int w) {
  for (int x = a; x <= N; x += x & -x) bit[x] += w;
}
int sum(int a) {
  int ret = 0;
  for (int x = a; x > 0; x -= x & -x) ret += bit[x];
  return ret;
}

/* DP
 * usage: chmin(dp[i],dp[i-1]+v);
 * */
const ll INF = 1LL << 60;
ll dp[100010];

template<class T> inline bool chmin(T& a, T b) {
      if (a > b) {
                a = b;
                        return true;
                            }
          return false;
}
template<class T> inline bool chmax(T& a, T b) {
      if (a < b) {
                a = b;
                        return true;
                            }
          return false;
}
void calc_sosuu(vector<ll>& sosuu){
  for(int i = 3;i<1000;++i){
    bool hoge = true;
    repi(itr,sosuu){
      if(i%*itr==0){
        hoge = false;
        break;
      }
      if(i<(*itr)*(*itr))break;
    }
    if(hoge){
      sosuu.push_back(i);
    }
  }
return;
}
ll gcd(ll a, ll b){
  if(a==0)return b;
  return gcd(b%a,a);
}
vector<ll> get_yakusuu(const vector<ll>& sosuu,ll n){
  vector<ll>ans;
  repi(itr,sosuu){
    if(n<(*itr)*(*itr))break;
    if(n%(*itr)==0)ans.push_back(*itr);
  }
  ans.push_back(n);
  return ans;
}
int main(){
        ios::sync_with_stdio(false);
        cin.tie(nullptr);
  vector<ll>sosuu = {2};
  calc_sosuu(sosuu);
  int n;cin>>n;
  string ans = "not coprime\n";
  vector<ll>a(n);
  vector<ll>b;
  rep(i,n)cin>>a[i];
  bool is_pairwise = true;
  repc(bit,2,n){
    vector<ll>temp;
    rep(i,n){
      if(bit&1<<i){
        temp.push_back(a[i]);
      }
    }
    ll g = gcd(temp[0],temp[1]);
    b.push_back(g);
    if(g!=1)is_pairwise = false;

  }
  if(is_pairwise){
    cout<<"pairwise coprime\n";
    return 0;
  }
  bool is_setwise = false;
  sort(b.begin(),b.end());
  if(b.front()==1)is_pairwise = true;
  vector<ll> hb = get_yakusuu(sosuu,b.front());
  repi(itr,hb){
    rep(i,b.size()-1){
      if(b[i+1]%(*itr)!=0){
        is_setwise = true;
        break;
      }
    }
  }
  if(is_setwise){
    cout<<"setwise coprime\n";
  }else{
    cout<<ans;
  }



        return 0;
}