#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a % b == 0) {
    return b;
  } else {
    return gcd(b, a % b);
  }
}
int e() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  int tmp = v[0];
  int maxgcd = INT_MIN;
  int allgcd = -1;
  bool pc = true;
  for (int i = 1; i < n; i++) {
    tmp = gcd(tmp, v[i]);
    int val = gcd(v[i - 1], v[i]);
    if (val != 1) pc = false;
    if (allgcd == -1) {
      allgcd = val;
    } else {
      allgcd = gcd(allgcd, val);
    }
    maxgcd = max(maxgcd, val);
  }
  if (pc) {
    cout << "pairwise coprime" << endl;
  } else if (allgcd == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
int f() { return 0; }
int main() {
  e();
  return 0;
}
