#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a < b) {
    swap(a, b);
  }
  if (b == 0) return a;
  long long r = a % b;
  while (r > 0) {
    a = b;
    b = r;
    r = a % b;
  }
  return b;
}
int main() {
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  string anstext1 = "pairwise coprime";
  string anstext2 = "setwise coprime";
  string anstext3 = "not coprime";
  vector<long long> gcc_acc(n + 1);
  int flagA = true;
  for (int i = 0; i < n; i++) {
    gcc_acc[i + 1] = gcd(gcc_acc[i], a[i]);
    if (i == 0) continue;
    if (1 != gcc_acc[i + 1]) {
      flagA = false;
    }
  }
  string anstext;
  if (flagA) {
    anstext = anstext1;
  } else {
    if (gcc_acc[n] == 1) {
      anstext = anstext2;
    } else {
      anstext = anstext3;
    }
  }
  cout << anstext << endl;
  return 0;
}
