#include <bits/stdc++.h>
using namespace std;
long long f[1000005] = {0};
const long long N = 1000001;
long long p[1000001];
bool vis[N];
long long get_prime() {
  vis[1] = 1;
  long long k = 0;
  for (long long i = 2; i < N; i++) {
    if (!vis[i]) p[k++] = i;
    for (long long j = 0; j < k && p[j] * i < N; j++) {
      vis[p[j] * i] = 1;
      if (i % p[j] == 0) break;
    }
  }
  return k;
}
signed main() {
  for (long long i = 1; i <= N; i++) {
    vis[i] = false;
  }
  get_prime();
  long long n;
  cin >> n;
  long long a[n + 1];
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    for (long long j = 0; p[j] * p[j] <= a[i]; j++) {
      if (a[i] % p[j] == 0) {
        f[p[j]]++;
      }
      while (a[i] % p[j] == 0) {
        a[i] /= p[j];
      }
    }
    if (a[i]) {
      f[a[i]]++;
    }
  }
  long long maxv = 0;
  for (long long i = 1; i <= 1000005; i++) {
    maxv = max(maxv, f[i]);
  }
  if (maxv == 1 || maxv == 0) {
    cout << "pairwise coprime";
  } else if (maxv == n) {
    cout << "not coprime";
  } else {
    cout << "setwise coprime";
  }
  return 0;
}
