#include <bits/stdc++.h>
using namespace std;
using vint = vector<int>;
using vll = vector<long long>;
template <class T>
using arr = vector<vector<T>>;
template <class T>
int popcount(T &a) {
  int c = 0;
  for (int i = 0; i < (8 * (int)sizeof(a)); i++) {
    if ((a >> i) & 1) c++;
  }
  return c;
}
template <class T>
void pr(T x) {
  cout << x << endl;
}
template <class T>
void prvec(vector<T> &a) {
  for (int i = 0; i < (a.size() - 1); i++) {
    cout << a[i] << " ";
  }
  pr(a[a.size() - 1]);
}
template <class T>
void prarr(arr<T> &a) {
  for (int i = 0; i < (a.size()); i++)
    if (a[i].empty())
      pr("");
    else
      prvec(a[i]);
}
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;
}
int main() {
  int n;
  cin >> n;
  vint sieve(1000005, 0);
  vint a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  for (int i = 0; i < (n); i++) {
    if (a[i] % 2 == 0) sieve[2]++;
    while (a[i] != 1 && a[i] % 2) a[i] /= 2;
    int j = 3;
    for (j = 3; j * j <= a[i]; j += 2) {
      if (a[i] % j == 0) sieve[j]++;
      while (a[i] != 1 && a[i] % j) a[i] /= j;
    }
    if (a[i] > j - 2) sieve[a[i]]++;
  }
  bool set_flg = false;
  for (int i = 0; i < (1000006); i++) {
    if (sieve[i] == n) {
      cout << "not coprime" << endl;
      return 0;
    }
    if (sieve[i] > 1) set_flg = true;
  }
  if (set_flg)
    cout << "setwise coprime" << endl;
  else
    cout << "pairwise coprime" << endl;
  return 0;
}
