#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
unsigned long long lcm(unsigned long long a, unsigned long long b) {
  return a / gcd(a, b) * b;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  int one = 0;
  for (int i = 0, i_len = (n); i < i_len; i++) {
    cin >> a[i];
    if (a[i] == 1) ++one;
  }
  vector<int> b1(n);
  b1[0] = a[0];
  set<int> st;
  for (int i = 0, i_len = (n); i < i_len; i++) st.insert(a[i]);
  ll res = *st.begin();
  auto itr = st.begin();
  ++itr;
  for (; itr != st.end(); ++itr) {
    res = gcd(res, *itr);
    if (res == 1) break;
  }
  if (res != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  if (((int)(st).size()) - (one - 1) < n) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  auto itr1 = st.rbegin();
  vector<int> p;
  p.push_back(*itr1);
  ++itr1;
  for (; itr1 != st.rend(); ++itr1) {
    for (int pi : p) {
      if (gcd(pi, *itr1) != 1) {
        cout << "setwise coprime" << endl;
        return 0;
      }
    }
    p.push_back(*itr1);
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
