#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  vector<long long> v(n);
  long long i, j;
  set<long long> s;
  for (i = 0; i < n; i++) {
    cin >> v[i];
    s.insert(v[i]);
  }
  map<int, int> m;
  for (auto it = s.begin(); it != s.end(); it++) {
    int val = *it;
    for (j = 2; j * j <= val; j++) {
      if (val % j == 0) {
        m[j]++;
        while (val % j == 0) val = val / j;
      }
    }
  }
  bool f = 1;
  int x = s.size();
  if (x != n) f = 0;
  bool t = 1;
  for (auto it = m.begin(); it != m.end(); it++) {
    if (it->second > 1) {
      f = 0;
    }
    if (it->second == x) t = 0;
  }
  if (f == 1) {
    cout << "pairwise coprime";
    return;
  }
  if (t == 1) {
    cout << "setwise coprime";
    return;
  }
  cout << "not coprime";
  return;
}
int main() {
  int t = 1;
  while (t--) solve();
  return 0;
}
