#include <bits/stdc++.h>
using namespace std;
int a[1000001];
int n;
bool setwise() {
  int minv = 10000000;
  for (int i = 0; i < n; i++) {
    if (minv > a[i]) {
      minv = a[i];
    }
  }
  int notzero = 1;
  while (notzero) {
    notzero = 0;
    int tmin = 10000000;
    for (int i = 0; i < n; i++) {
      a[i] %= minv;
      if (a[i]) {
        notzero++;
        if (tmin > a[i]) {
          tmin = a[i];
        }
      }
    }
    if (notzero) minv = tmin;
  }
  return minv == 1;
}
int gcd(int x, int y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int sumofgcd = 0;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      sumofgcd += gcd(a[i], a[j]);
    }
  }
  if (sumofgcd == n * (n - 1) / 2) {
    cout << "pairwise coprime\n";
    return 0;
  }
  if (setwise()) {
    cout << "setwise coprime\n";
    return 0;
  }
  cout << "not coprime" << '\n';
  return 0;
}
