#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int inf = 1000000000;
const int N = 2000007, M = N;
long long i, j, cnt, par;
vector<int> vec[N];
void solve() {
  long long n;
  cin >> n;
  long long x, m = INT_MIN, g = 0, p = 0;
  map<int, int> make_pair;
  bool f = 0;
  for (int j = 0; j < n; j++) {
    cin >> x;
    for (int i = 2; i * i <= x; i++) {
      if (x % i == 0) {
        make_pair[i]++;
        if (make_pair[i] > 1) f = 1;
        while (x % i == 0) x /= i;
      }
      if (x > 1) make_pair[x]++;
      if (make_pair[x] > 1) f = 1;
    }
  }
  if (!f)
    cout << "pairwise coprime\n";
  else {
    for (auto p : make_pair) {
      if (p.second == n) {
        cout << "not coprime\n";
        return;
      }
    }
    cout << "setwise coprime\n";
  }
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
