#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
int main() {
  ll n;
  cin >> n;
  vector<ll> a(n);
  vector<bool> pf(1001000);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  bool ok = true;
  for (int i = 0; i < (n); ++i) {
    ll tmp = a[i];
    for (int j = (2); j < ((int)ceil(sqrt(a[i])) + 1); ++j) {
      if (tmp % j == 0 and pf[j]) {
        ok = false;
        goto jump;
      }
      while (tmp % j == 0) {
        tmp /= j;
        pf[j] = true;
      }
    }
  }
jump:
  if (ok) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int g = gcd(a[0], a[1]);
  for (int i = 0; i < (n); ++i) {
    g = gcd(g, a[i]);
  }
  if (g == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
