#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
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 (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  vector<int> b(n - 1);
  bool flag = true;
  for (int i = 0; i < (n - 1); ++i) {
    b[i] = gcd(a[i], a[i + 1]);
    if (b[i] != 1) flag = false;
  }
  if (flag) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  flag = true;
  for (int i = 0; i < (n - 2); ++i) {
    int c = gcd(b[i], b[i + 1]);
    if (c != 1) flag = false;
  }
  if (flag) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  return 0;
}
