#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF_LL = 1e18 + 11;
const int INF_int = 1e9 + 11;
long long gcd(long long a, long long b) {
  if (a < b) swap(a, b);
  while (a % b != 0) {
    swap(a, b);
    b = b % a;
  }
  return b;
}
vector<long long> makeprimes(long n) {
  bool judge[n + 1];
  for (int i = 0; i <= n; i++) {
    judge[i] = true;
  }
  vector<long long> prime;
  for (int i = 2; i <= n; i++) {
    if (judge[i]) {
      for (int j = 2 * i; j <= n; j += i) {
        judge[j] = false;
      }
      prime.push_back(i);
    }
  }
  return prime;
}
int main() {
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  long long t = a[0];
  for (int i = 1; i < n; i++) t = gcd(t, a[i]);
  if (t != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  vector<long long> primes = makeprimes(1003);
  int s = primes.size();
  vector<int> vec(s);
  fill(vec.begin(), vec.end(), 0);
  bool fl = true;
  set<int> st;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < s; j++) {
      long long now = primes[j];
      if (a[i] % now == 0) vec[i]++;
      while (a[i] % now == 0) {
        a[i] /= now;
      }
    }
    if (st.empty())
      st.insert(a[i]);
    else if (a[i] != 1) {
      if (st.count(a[i]) != 0) {
        fl = false;
      } else {
        st.insert(a[i]);
      }
    }
  }
  for (int i = 0; i < s; i++) {
    if (vec[i] >= 2) fl = false;
  }
  if (fl)
    cout << "pairwise coprime" << endl;
  else
    cout << "setwise coprime" << endl;
}
