#include <bits/stdc++.h>
using ll = long long;
using namespace std;
void solve() {}
ll gcd(ll a, ll b) {
  if (a % b == 0) {
    return (b);
  } else {
    return (gcd(b, a % b));
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  ll n;
  cin >> n;
  vector<ll> a(n);
  bool q = false;
  bool p = true;
  for (ll i = 0; i < n; i++) {
    cin >> a[i];
  }
  ll g = a[0];
  for (ll i = 0; i < n; i++) {
    g = gcd(a[i], g);
  }
  if (g == 1) q = true;
  ll mod = 1000000007;
  ll o = 1;
  for (ll i = 0; i < n; i++) {
    o *= a[i];
    o %= mod;
  }
  for (ll i = 0; i < n; i++) {
    ll tmp = o / a[i];
    if (gcd(a[i], tmp) != 1) {
      p = false;
      break;
    }
  }
  if (p && q) {
    cout << "pairwise coprime";
  } else if (q) {
    cout << "setwise coprime";
  } else {
    cout << "not coprime";
  }
  return 0;
}
