#include <bits/stdc++.h>

#define rep(i, n) for (ll i = 0; i < (n); i++)
using namespace std;
typedef long long ll;

const int MX = 100003;

int main() {
  ll n;
  cin >> n;
  vector<ll> a(n), c(MX, 0);
  rep(i, n) cin >> a[i], c[a[i]]++;

  ll g = 0;
  rep(i, n) g = __gcd(g, a[i]);

  if (g != 1) {
    cout << "not coprime" << endl;
    return 0;
  }

  bool pairwise = true;
  for (int i = 2; i < MX; ++i) {
    ll cnt = 0;
    for (int j = i; j < MX; j += i) cnt += c[j];
    if (cnt > 1) pairwise = false;
  }

  cout << (pairwise ? "pairwise coprime" : "setwise coprime") << endl;

  return 0;
}