#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(),a.end()
#define sz(x) (int)(x).size()
#define uni(x) x.erase(unique(rng(x)),x.end())
#define show(x) cout<<#x<<" = "<<x<<endl;
#define PQ(T) priority_queue<T,v(T),greater<T> >
#define newline puts("")
#define v(T) vector<T>
#define vv(T) v(v(T))
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
#define EPS (1e-10)
#define equals(a, b) (fabs((a)-(b)) < EPS)
using namespace std;
typedef long long int ll;
typedef pair<int,int> P;
typedef set<int> S;
typedef queue<int> Q;
typedef queue<P> QP;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
const ll LINF = 1001002003004005006ll;
const int INF = 1001001001;
const int MOD = 1000000007;

map<ll,int> primefact(ll num) {
    map<ll,int> res;
    for (ll i = 2; i * i <= num; i++) {
        int cnt = 0;
        while (num % i == 0) {
            cnt++;
            num /= i;
        }
        if (cnt) res[i] = cnt;
    }
    if (num != 1) res[num] = 1;
    return res;
}
  
int main() {
  int n;
  cin >> n;
  vi a(n);
  rep(i,n) {
    cin >> a[i];
  }
  map<ll,int> mp;
  rep(i,n) {
    auto r = primefact(a[i]);
    for(auto b:r) {
      mp[b.first]++;
    }
  }
  bool ispc=true;
  for(auto b:mp) {
    if(b.second==n) {
      cout << "not coprime" << endl;
      return 0;
    } else if(b.second>1) {
      ispc=false;
    }
  }
  if(ispc) {
    cout << "pairwise coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
  return 0;
}