#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using st = string;
using P = pair<int, int>;
const st p = "pairwise coprime";
const st s = "setwise coprime";
const st no = "not coprime";
bool gcd(int x, int y) {
  if (y % x != 0)
    return true;
  else
    return false;
}
bool setgcd(vector<int> &a) {
  int sz = a.size();
  bool g = true;
  for (int i = 0; i < sz - 1; i++) {
    for (int j = i + 1; j < sz; j++) {
      if (gcd(a.at(i), a.at(j))) {
        g = false;
        break;
      }
    }
    if (!g) break;
  }
  return g;
}
int main() {
  int n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a.at(i);
  sort(a.begin(), a.end());
  st ans;
  for (int i = 0; i < n - 1; i++) {
    bool br = true;
    for (int j = i + 1; j < n; j++) {
      if (!gcd(a.at(i), a.at(j))) {
        br = false;
        ans = no;
        break;
      }
    }
    if (!br) break;
    if (i == n - 2) ans = p;
  }
  if (ans == no) {
    if (!setgcd(a)) ans = s;
  }
  cout << ans << endl;
  return 0;
}
