#include <bits/stdc++.h>

using namespace std;

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<int> g(n + 1, 0);
  g[n - 1] = a[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    g[i] = __gcd(g[i + 1], a[i]);
  }
  bool pc = true;
  for (int i = 0; i < n - 1; i++) {
    int nxt = g[i + 1];
    pc &= (__gcd(a[i], nxt) == 1);
  }
  if (pc) {
    cout << "pairwise coprime" << '\n';
    exit(0);
  }
  int x = a[0];
  for (int i = 1; i < n; i++) {
    x = __gcd(x, a[i]);
  }
  if (x == 1) {
    cout << "setwise coprime" << '\n';
  }
  else {
    cout << "not coprime" << '\n';
  }
}
