#include <bits/stdc++.h>
using namespace std;
int64_t gcd(int a, int b) {
  int64_t g = max(a, b), l = min(a, b), n = l;
  while (g % l != 0) {
    n = g % l;
    g = l;
    l = n;
  }
  return n;
}
bool contains(set<int> a, int n) {
  bool ans = false;
  for (int x : a) {
    if (x == n) {
      ans = true;
      break;
    }
  }
  return ans;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  set<int> sins;
  bool pa = true, se = true;
  for (int i = 0; i < n; i++) {
    cin >> a.at(i);
    for (int j = 2; j * j < a.at(i); j++) {
      if (a.at(i) % j == 0) {
        if (contains(sins, j))
          pa = false;
        else
          sins.insert(j);
      }
    }
  }
  int64_t k = a.at(0);
  for (int i = 1; i < n; i++) k = gcd(k, a.at(i));
  if (k != 1) se = false;
  cout << (pa ? "pairwise coprime" : (se ? "setwise coprime" : "not coprime"))
       << endl;
  return 0;
}
