#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]);
  bool f = 1;
  for (ll i = 0; i < (n - 1); ++i) {
    if (gcd(a[i], a[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;
}
