#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18 + 5;
const long long mod = 1e9 + 7;
const long long N = 2e5 + 314;
const long double pi = 3.1415926535897932384626433832795;
long long gcd(long long x, long long y) { return (x == 0 ? y : gcd(y % x, x)); }
void solve() {
  long long n;
  cin >> n;
  vector<long long> v(n);
  unordered_map<long long, long long> u, cnt;
  long long gc = 0, ok = 1;
  for (long long i = 0; i < n; i++) {
    cin >> v[i];
    cnt[v[i]]++;
    if (cnt[v[i]] > 1) ok = 0;
    gc = gcd(gc, v[i]);
  }
  if (gc > 1) {
    cout << "not coprime";
    return;
  }
  if (!ok) {
    cout << "setwise coprime";
    return;
  }
  for (long long i = 0; i < n; i++) {
    for (long long j = 2; j <= sqrt(v[i]); j++) {
      if (v[i] % j == 0) {
        u[j]++;
        if (j * j != v[i]) {
          u[v[i] / j]++;
          if (u[j] >= 2 || u[v[i] / j] >= 2) {
            cout << "setwise coprime";
            return;
          }
        }
      }
    }
  }
  if (gc > 1)
    cout << "not coprime";
  else
    cout << "pairwise coprime";
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t = 1;
  while (t--) solve();
}
