#include <bits/stdc++.h>
using namespace std;
long long INF = 1e16 + 7;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
void solve() {
  long long n;
  cin >> n;
  map<long long, long long> d;
  bool ch = 1;
  long long g = 0;
  while (n--) {
    long long x;
    cin >> x;
    if (!g) g = x;
    g = gcd(g, x);
    for (long long i = 2; i * i < x; ++i) {
      if (x % i == 0) {
        if (d[i]++) ch = 0;
        while (x % i == 0) x /= i;
      }
    }
    if (x != 1)
      if (d[x]++) ch = 0;
  }
  if (ch)
    cout << "pairwise coprime";
  else if (g == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
signed main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cout << setprecision(10) << fixed;
  solve();
  return 0;
}
