#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vb = vector<bool>;
using vc = vector<char>;
using vs = vector<string>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<ll>>;
using vvb = vector<vector<bool>>;
using vvc = vector<vector<char>>;
using vvs = vector<vector<string>>;
template <typename T>
using vv = vector<vector<T>>;
template <typename T>
using vvv = vector<vector<vector<T>>>;
template <typename T>
using pq = priority_queue<T>;
template <typename T>
using pqg = priority_queue<T, vector<T>, greater<T>>;
const int INF = 1e9;
const ll LINF = 1e18;
const ll MOD = 1e9 + 7;
const int DX[4] = {1, 0, -1, 0};
const int DY[4] = {0, 1, 0, -1};
template <typename T, typename U>
inline bool umax(T& m, U x) {
  if (m < x) {
    m = x;
    return true;
  }
  return false;
}
template <typename T, typename U>
inline bool umin(T& m, U x) {
  if (m > x) {
    m = x;
    return true;
  }
  return false;
}
template <typename T>
inline void errv(T& v) {
  for (auto x : v) cerr << x << " ";
  cerr << endl;
}
inline void errv(vb& v) {
  for (auto x : v) cerr << (x ? 1 : 0) << " ";
  cerr << endl;
}
template <typename T>
inline void dbgn(string n, T x) {
  cerr << n << ": " << x << endl;
}
template <typename T>
inline void dbgn(string n, vector<T>& v) {
  cerr << n << ": ";
  errv(v);
}
template <typename T>
inline void dbgn(string n, vv<T>& m) {
  cerr << n << ":" << endl;
  for (auto& v : m) errv(v);
}
int main() {
  int n;
  cin >> n;
  vi a(n);
  for (ll i = 0; i < (n); i++) cin >> a[i];
  vi y(1000001, 0);
  for (ll i = 0; i < (n); i++) {
    for (int j = 1; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        y[j]++;
        if (j != a[i] / j) {
          y[a[i] / j]++;
        }
      }
    }
  }
  sort((y).rbegin(), (y).rend());
  if (y[1] <= 1) {
    cout << ("pairwise coprime") << endl;
  } else if (y[1] == n) {
    cout << ("not coprime") << endl;
  } else {
    cout << ("setwise coprime") << endl;
  }
  return 0;
}
