#include <bits/stdc++.h>
using namespace std;
unsigned int gcd(unsigned int u, unsigned int v) {
  int shift;
  if (u == 0) return v;
  if (v == 0) return u;
  shift = __builtin_ctz(u | v);
  u >>= __builtin_ctz(u);
  do {
    v >>= __builtin_ctz(v);
    if (u > v) {
      unsigned int t = v;
      v = u;
      u = t;
    }
    v = v - u;
  } while (v != 0);
  return u << shift;
}
int main() {
  int n;
  int a[1000000];
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  int pw_ok = 1;
  long long pw = a[0];
  int sw = a[0];
  int g;
  for (int i = 1; i < n; i++) {
    sw = gcd(sw, a[i]);
    g = gcd(pw, a[i]);
    if (g != 1) pw_ok = 0;
    pw = pw * a[i] / g;
  }
  if (pw_ok) {
    cout << "pairwise coprime" << endl;
  } else if (sw == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
