#include <bits/stdc++.h>
using namespace std;
#define rep(i, a) for (int i = 0; i < (a); i++)
typedef long long ll;

#ifdef _DEBUG
inline void dump() { cerr << endl; }
template <typename Head> void dump(Head &&head) {
  cerr << head;
  dump();
}
template <typename Head, typename... Tail>
void dump(Head &&head, Tail &&... tail) {
  cerr << head << ", ";
  dump(forward<Tail>(tail)...);
}
#define debug(...)                                                             \
  do {                                                                         \
    cerr << __LINE__ << ":\t" << #__VA_ARGS__ << " = ";                        \
    dump(__VA_ARGS__);                                                         \
  } while (false)
#else
#define dump(...)
#define debug(...)
#endif

template <typename T> struct edge {
  int src, to;
  T cost;
  edge(int to, T cost) : src(-1), to(to), cost(cost) {}
  edge(int src, int to, T cost) : src(src), to(to), cost(cost) {}
  edge &operator=(const int &x) {
    to = x;
    return *this;
  }
  operator int() const { return to; }
};
template <typename T> using Edges = vector<edge<T>>;
template <typename T> using WeightedGraph = vector<Edges<T>>;
using UnWeightedGraph = vector<vector<int>>;
template <typename T> using Matrix = vector<vector<T>>;

/////////////////////////////////////////////////////////////////////

const ll inf = 1LL << 60;

const string pa = "pairwise coprime";
const string st = "setwise coprime";
const string no = "not coprime";

vector<ll> divisor(ll n)
{
  vector<ll> res;
  for (ll i=1; i*i<=n; i++) {
    if (n%i == 0) {
      res.push_back(i);
      if (i != n/i) res.push_back(n/i);
    }
  }
  sort(res.begin(), res.end());
  return res;
}

int main() {

  ll n; cin >> n;
  vector<ll> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }

  vector<ll> l(n);
  l[0] = a[0];
  vector<ll> r(n);
  r[n-1] = a[n-1];
  for (int i=1; i<n; i++) {
    l[i] = gcd(l[i-1], a[i]);
    r[n-i-1] = gcd(r[n-i], a[n-i-1]);
  }
  if (l[n-1] > 1) {
    cout << no << endl;
    return 0;
  }

  vector<ll> mp(1000001);
  for (int i=0; i<n; i++) {
    ll t = a[i];
    for (ll j=2; j*j<=t; j++) {
      if (t%j == 0) {
        mp[j]++;
        if (j != t/j) mp[t/j]++;
      }
    }
  }
  for (int i=0; i<=1000000; i++) {
    if (mp[i] >= 2) {
      cout << st << endl;
      return 0;
    }
  }
  cout << pa << endl;

  return 0;
}
