#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  b %= a;
  if (b == 0)
    return a;
  else
    gcd(b, a);
}
vector<long long int> prime_factorization(long long int x) {
  vector<long long int> v;
  long long int i;
  for (i = 2; i < x; i++) {
    if (x % i == 0) {
      v.push_back(i);
      while (x % i == 0) x /= i;
    }
  }
  if (x != 1) v.push_back(x);
  return v;
}
void solve() {
  int n, m;
  scanf("%d", &n);
  vector<int> A(n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &A[i]);
  }
  sort((A).begin(), (A).end());
  int tmp = A[0];
  for (int i = 1; i < n; i++) {
    tmp = gcd(tmp, A[i]);
  }
  if (tmp > 1) {
    printf("not coprime\n");
    return;
  }
  if (A.size() > 80000) {
    printf("setwise coprime\n");
    return;
  }
  vector<int> X(0);
  for (int i = 0; i < n; i++) {
    auto f = prime_factorization(A[i]);
    for (auto j = f.begin(); j < f.end(); j++) {
      auto tmp = find((X).begin(), (X).end(), *j);
      if (tmp != X.end())
        goto setwise;
      else {
        int b = *j;
        X.push_back(b);
      }
    }
  }
  printf("pairwise coprime\n");
  return;
setwise:
  printf("setwise coprime\n");
  return;
}
int main() {
  solve();
  return 0;
}
