#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 n;
  cin >> n;
  vector<int> a(n);
  for (ll i = 0; i < (n); ++i) cin >> a[i];
  sort(a.begin(), a.end());
  ll G = a[0];
  for (ll i = 0; i < (n); ++i) G = gcd(G, a[i]);
  vector<int> l(n + 1), r(n + 1);
  l[1] = a[0], r[n - 1] = a[n - 1];
  for (int i = 1; i < n; i++) l[i + 1] = gcd(l[i], a[i]);
  for (int i = n - 2; i >= 0; i--) r[i] = gcd(r[i + 1], a[i]);
  bool f = 1;
  for (ll i = 0; i < (n); ++i)
    if (gcd(l[i], r[i + 1]) != 1) f = 0;
  if (G == 1) {
    if (f)
      cout << "pairwise coprime" << endl;
    else
      cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
