#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int inf = 1e9;
const long long INF = 1LL << 60;
map<long long, long long> prime_factors(long long n) {
  map<long long, long long> res;
  if (n == 1) {
    res[n] = 1;
    return res;
  }
  for (long long i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      ++res[i];
      n /= i;
    }
  }
  if (n != 1) {
    res[n] = 1;
  }
  return res;
}
int main() {
  int n;
  cin >> n;
  long long a[n];
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  map<int, int> m;
  for (int i = 0; i < (int)(n); i++) {
    set<int> s;
    map<long long, long long> pf = prime_factors(a[i]);
    for (auto j : pf) {
      m[j.first]++;
    }
  }
  bool f = false;
  for (auto i : m) {
    if (i.second == n) f = true;
  }
  if (f) {
    cout << "not coprime";
  } else {
    bool pw = true;
    for (auto i : m) {
      if (i.second > 1) {
        pw = false;
      }
    }
    if (pw) {
      cout << "pairwise coprime";
    } else {
      cout << "setwise coprime";
    }
  }
}
