#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
vector<pii> pf(int n) {
  vector<pii> res;
  int tmp = n;
  for (int i = 2; i < (int)sqrt(n) + 1; i++) {
    if (tmp % i == 0) {
      int cnt = 0;
      while (tmp % i == 0) {
        cnt++;
        tmp /= i;
      }
      res.emplace_back(i, cnt);
    }
  }
  if (tmp != 1) res.emplace_back(tmp, 1);
  if (res.empty()) res.emplace_back(n, 1);
  return res;
}
int gcd(int a, int b) {
  if (a < b) swap(a, b);
  int r = a % b;
  while (r != 0) {
    a = b;
    b = r;
    r = a % b;
  }
  return b;
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < (N); i++) cin >> A[i];
  vector<int> af;
  set<int> s;
  for (int i = 0; i < (N); i++) {
    vector<pii> res = pf(A[i]);
    for (auto p : res) {
      af.push_back(p.first);
      s.insert(p.first);
    }
  }
  if (af.size() == s.size()) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int a = A[0];
  for (int i = 1; i < N; i++) {
    a = gcd(a, A[i]);
  }
  if (a == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
