#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vb = vector<bool>;
using vvb = vector<vb>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
int INF = 1ll << 30;
int main() {
  int n;
  cin >> n;
  vi a(n);
  for (int i = (int)(0); i < (int)(n); i++) cin >> a[i];
  vi prime(0);
  for (int i = 2; i * i <= 1000020; i++) {
    bool check = true;
    for (auto j : prime) {
      if (i % j == 0) {
        check = false;
        break;
      }
    }
    if (check) prime.push_back(i);
  }
  vi cnt(1000020, 0);
  for (int i = (int)(0); i < (int)(n); i++) {
    for (auto j : prime) {
      if (a[i] % j == 0) cnt[j]++;
    }
  }
  bool p = true;
  bool s = true;
  for (auto i : prime) {
    if (cnt[i] > 1) p = false;
    if (cnt[i] == n) s = false;
  }
  if (p)
    cout << "pairwise coprime" << endl;
  else if (s)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
