#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using Graph = vector<vector<int>>;
const double PI = 3.14159265358979323846;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
ll gcd(ll x, ll y) { return (x % y) ? gcd(y, x % y) : y; }
ll lcm(ll x, ll y) { return x / gcd(x, y) * y; }
int main() {
  int n;
  cin >> n;
  vector<ll> a(n);
  for (ll i = 0; i < (ll)(n); i++) cin >> a[i];
  ll setwise = gcd(a[0], a[1]);
  for (ll i = 0; i < (ll)(n); i++) {
    setwise = gcd(setwise, a[i]);
    if (setwise == 1) break;
  }
  bool pairwise = true;
  for (ll i = 0; i < (ll)(n); i++) {
    for (ll j = i + 1; j <= (ll)(n - 1); j++) {
      if (gcd(a[i], a[j]) != 1) {
        pairwise = false;
        break;
      }
    }
    if (!pairwise) break;
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
  } else {
    if (setwise == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
  return 0;
}
