#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
long long gcd(long long n, long long m) {
  if (n > m) {
    long long l = n;
    n = m;
    m = l;
  }
  if (n == 0) {
    return m;
  }
  while (1) {
    long long l = n;
    n = m % n;
    m = l;
    if (n == 0) {
      break;
    }
  }
  return m;
}
bool isprime(long long n) {
  if (n == 1) {
    return false;
  }
  if (n == 2) {
    return true;
  }
  long long sq = (long long)sqrt(double(n));
  for (long long i = 2; i <= sq; i++) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  long long i, j, k, l;
  long long N;
  cin >> N;
  vector<long long> A(N);
  for (auto &e : A) cin >> e;
  long long g = A[0];
  for (i = 1; i < N; i++) {
    g = gcd(g, A[i]);
  }
  if (g > 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  for (i = 2; i <= 1010; i++) {
    if (!isprime(i)) {
      continue;
    }
    long long count = 0;
    for (j = 0; j < N; j++) {
      if (A[j] % i == 0) {
        count++;
      }
    }
    if (count >= 2) {
      cout << "setwise coprime" << endl;
      return 0;
    }
  }
  set<long long> pset;
  for (i = 0; i < N; i++) {
    if (A[i] > 1000 && isprime(A[i])) {
      auto itr = pset.find(A[i]);
      if (itr != pset.end()) {
        cout << "setwise coprime" << endl;
        return 0;
      }
      pset.insert(A[i]);
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
