#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 1;
long long prime[N];
void seive() {
  memset(prime, -1, sizeof(prime));
  for (long long i = 2; i * i <= N; i++) {
    if (prime[i] == -1) {
      prime[i] = i;
      for (long long j = i * i; j <= N; j += i) prime[j] = i;
    }
  }
}
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
void solve() {
  seive();
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long g = a[0];
  for (long long i = 1; i < n; i++) {
    g = gcd(g, a[i]);
  }
  if (g != 1) {
    cout << "not coprime\n";
    return;
  }
  set<long long> s;
  bool f = 1;
  for (long long i = 0; i < n; i++) {
    set<long long> temp;
    long long x = a[i];
    while (prime[x] != -1) {
      long long d = prime[x];
      temp.insert(d);
      x /= d;
    }
    for (auto it : temp) {
      if (s.find(it) != s.end()) {
        f = 0;
        break;
      }
      s.insert(it);
    }
  }
  if (f)
    cout << "pairwise coprime\n";
  else
    cout << "setwise coprime\n";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
