#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  int g = max(a, b), l = min(a, b), n = l;
  while (g % l != 0) {
    n = g % l;
    g = l;
    l = n;
  }
  return n;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  vector<pair<int, bool>> prime(1, make_pair(2, false));
  bool chec = true;
  for (int i = 3; i < 1000; i += 2) {
    chec = true;
    for (int j = 0; j < prime.size(); j++) {
      if (i % prime.at(j).first == 0) {
        chec = false;
        break;
      }
    }
    if (chec) prime.push_back(make_pair(i, false));
  }
  bool pa = true, se = true;
  for (int i = 0; i < n; i++) {
    cin >> a.at(i);
    for (int j = 0, l = prime.size(); j < l; j++) {
      if (a.at(i) % prime.at(j).first == 0) {
        if (prime.at(j).second) {
          pa = false;
        } else {
          prime.at(j).second = true;
        }
      }
    }
  }
  int k = gcd(a.at(0), a.at(1));
  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;
}
