#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int A[N];
  for (int i = (0); i < (N); ++i) cin >> A[i];
  vector<int> ps;
  for (int i = (2); i < (1001); ++i) {
    bool f = true;
    for (int j = (2); j < (i); ++j)
      if (i % j == 0) f = false;
    if (f) ps.push_back(i);
  }
  map<int, int> m;
  for (int i = (0); i < (N); ++i) {
    int B = A[i];
    for (auto e : ps) {
      if (B % e == 0) m[e]++;
      while (B % e == 0) B /= e;
    }
    if (B > 1) m[B]++;
  }
  int k = 0;
  for (auto e : m) {
    k = max(k, e.second);
  }
  if (k == N)
    cout << "not coprime" << endl;
  else if (k == 1)
    cout << "pairwise coprime" << endl;
  else
    cout << "setwise coprime" << endl;
  return 0;
}
