#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using vpi = vector<pii>;
int p[1001];
void addPrimes(int x) {
  for (int i = 1; i <= (int)(sqrt(x)) + 1; i++) {
    if (x % i == 0) {
      if (x / i == i)
        p[i]++;
      else {
        p[i]++;
        p[x / i]++;
      }
    }
  }
}
int gcd(int u, int v) {
  int shift;
  if (u == 0) return v;
  if (v == 0) return u;
  shift = __builtin_ctz(u | v);
  u >>= __builtin_ctz(u);
  do {
    v >>= __builtin_ctz(v);
    if (u > v) {
      unsigned int t = v;
      v = u;
      u = t;
    }
    v = v - u;
  } while (v != 0);
  return u << shift;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vi a(n);
  for (int &x : a) cin >> x;
  memset(p, 0, sizeof(p));
  for (int x : a) {
    addPrimes(x);
  }
  bool ans = true;
  for (int i = 2; i <= 1000; i++) {
    if (p[i] > 1) ans = false;
  }
  if (ans)
    cout << "pairwise coprime\n";
  else {
    int res = a[0];
    for (int i = 1; i < n; i++) res = gcd(res, a[i]);
    if (res == 1)
      cout << "setwise coprime\n";
    else
      cout << "not coprime\n";
  }
  return 0;
}
