#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using ull = unsigned long long;
const ll K_MAX = 1e5 + 5;
const ll Lmax = ll(1e18);
const int Nmax = 2e5 + 1;
const int Nd = 61;
const int INF = 1e5;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
int main() {
  ll n;
  cin >> n;
  vector<ll> a(n);
  bool pc = true, sc = true;
  ll sgcd;
  for (int i = 0; i < (n); ++i) {
    cin >> a[i];
    if (i == 1) {
      sgcd = gcd(a[0], a[1]);
    }
    if (i > 1) {
      sgcd = gcd(sgcd, a[i]);
    }
    if (pc) {
      for (int j = 0; j < i; j++) {
        if (gcd(a[i], a[j]) != 1) {
          pc = false;
          break;
        }
      }
    }
  }
  if (pc) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  if (sgcd == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
