#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
static const ll INF = 1e17;
int gcd(int x, int y) {
  if (x == 0) return y;
  return gcd(y % x, x);
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0, i_len = (n); i < i_len; ++i) cin >> a[i];
  int nowgcd = a[0];
  for (int i = 0, i_len = (n); i < i_len; ++i) nowgcd = gcd(nowgcd, a[i]);
  if (nowgcd != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  if (n >= 78500) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  vector<bool> factorused(1000002, false);
  for (int i = 0, i_len = (n); i < i_len; ++i) {
    for (int j = 2; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        if (factorused[j]) {
          cout << "setwise coprime" << endl;
          return 0;
        }
        while (a[i] % j == 0) a[i] /= j;
        factorused[j] = true;
      }
    }
    if (a[i] != 1) {
      if (factorused[a[i]]) {
        cout << "setwise coprime" << endl;
        return 0;
      }
      factorused[a[i]] = true;
      a[i] = 1;
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
