#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
int main() {
  int lim = 10e6;
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) {
    int num;
    cin >> num;
    a[i] = num;
  }
  vector<bool> memo(lim + 1);
  auto is_p = [&]() {
    for (int i = 0; i < n - 1; i++) {
      for (int j = i + 1; j < n; j++) {
        if (gcd(a[i], a[j]) > 1) {
          return false;
        }
      }
    }
    return true;
  };
  if (is_p()) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  auto is_s = [&]() {
    int g = a[0];
    for (int i = 1; i < n; i++) {
      g = gcd(g, a[i]);
      if (g == 1) {
        return true;
      }
    }
    return false;
  };
  if (is_s()) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  return 0;
}
