#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
using Pll = pair<long long, long long>;
template <class T>
using Vec = vector<T>;
template <class T>
using VVec = vector<vector<T>>;
long long TEN(int i) { return !i ? 1 : TEN(i - 1) * 10LL; }
template <class T, class U>
bool chmin(T& a, const U& b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T, class U>
bool chmax(T& a, const U& b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
struct IoSetup {
  IoSetup() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);
  }
} iosetup;
vector<ll> divisor(ll n) {
  vector<ll> ret;
  for (ll i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      ret.push_back(i);
      if (i * i != n) ret.push_back(n / i);
    }
  }
  sort(begin(ret), end(ret));
  return (ret);
}
int main() {
  int N;
  cin >> N;
  int A[N];
  for (int(i) = 0; (i) < (N); (i)++) cin >> A[i];
  vector<int> cnt(1000005, 0);
  for (int(i) = 0; (i) < (N); (i)++) {
    vector<ll> tmp = divisor((ll)A[i]);
    for (int(j) = (1); (j) < (tmp.size()); (j)++) cnt[tmp[j]]++;
  }
  if (*max_element(cnt.begin(), cnt.end()) < 2) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  if (*max_element(cnt.begin(), cnt.end()) != N) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
