#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pull = pair<ull, ll>;
using pis = pair<int, string>;
#define all(x) (x).begin(), (x).end()
#define INF 1000000000
#define LLINF 10000000000000000ll
#define MOD1 1000000007LL
#define MOD2 999999937LL

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  //cout << fixed << setprecision(15)

  ll n;
  cin >> n;
  vector<ll> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];

  if (n > 100000) {
    ll gcdall = a[0];
    for (int i = 0; i < n; i++) gcdall = __gcd(gcdall, a[i]);
    if (gcdall == 1) cout << "setwise coprime" << endl;
    else cout << "not coprime" << endl;
    return 0;
  }

  vector<bool> isuse(1100001, false);
  bool ispairwise = true;
  ll gcdall = a[0];
  for (int i = 0; i < n; i++) {
    gcdall = __gcd(gcdall, a[i]);
    ll tar = a[i];
    for (int p = 2; p * p <= a[i]; p++) {
      if (tar % p == 0) {
        if (!isuse[p]) isuse[p] = true;
        else ispairwise = false;
        while (tar % p == 0) tar /= p;
      }
    }
    if (tar != 1) {
      if (!isuse[tar]) isuse[tar] = true;
      else ispairwise = false;
    }
  }
  if (ispairwise) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  if (gcdall == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  
}
