#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];
  }
  vector<int> gcds(n - 1);
  bool ispc = true;
  for (int i = 0, i_len = (n - 1); i < i_len; ++i) {
    gcds[i] = gcd(a[i], a[i + 1]);
    if (gcds[i] != 1) ispc = false;
  }
  if (ispc) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int nowgcd = gcds[0];
  for (int i = 0, i_len = (n - 1); i < i_len; ++i) {
    nowgcd = gcd(nowgcd, gcds[i]);
  }
  if (nowgcd == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  } else {
    cout << "not coprime" << endl;
    return 0;
  }
}
