#include <bits/stdc++.h>
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using lb = long double;
const int dy[4] = {1, 0, -1, 0};
const int dx[4] = {0, 1, 0, -1};
template <class T = int>
T in() {
  T x;
  cin >> x;
  return (x);
}
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;
}
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int lcm(int a, int b) { return a * b / gcd(a, b); }
int two(int n) {
  ll ans = 1;
  for (int i = 0; i < (n); ++i) {
    ans *= 2;
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  int n;
  cin >> n;
  vector<int> a(n);
  int res = 0;
  bool ok = 1;
  for (int i = 0; i < (n); ++i) {
    int b;
    cin >> b;
    res = gcd(res, b);
    a[i] = b;
    if (i != 0 && res != 1) {
      ok = 0;
    }
  }
  if (res != 1) {
    cout << "not coprime"
         << "\n",
        0;
  } else {
    if (ok) {
      unordered_set<int> ret;
      bool nuke = 0;
      for (int i = 0; i < (n); ++i) {
        int r = a[i];
        if (r != 1 && ret.count(r)) {
          nuke = 1;
          break;
        } else {
          ret.insert(r);
        }
        for (int i = 2; i * i <= r; i++) {
          if (r % i == 0) {
            if (ret.count(i)) {
              nuke = 1;
            } else {
              ret.insert(i);
            }
          }
          if (nuke) break;
        }
        if (nuke) break;
      }
      if (nuke)
        cout << "setwise coprime"
             << "\n",
            0;
      else
        cout << "pairwise coprime"
             << "\n",
            0;
    } else {
      cout << "setwise coprime"
           << "\n",
          0;
    }
  }
  return 0;
}
