#include <bits/stdc++.h>
using namespace std;
int gcd(int i, int j) {
  int flag, k;
  if (j > i) {
    int temp;
    temp = i;
    i = j;
    j = temp;
  }
  k = i % j;
  if (k == 0)
    flag = j;
  else
    return gcd(j, k);
  return flag;
}
int main() {
  int n;
  cin >> n;
  int a[n], k, i, j;
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (i = 0; i < n - 1; i++) {
    for (j = i + 1; j < n; j++) {
      k = gcd(a[i], a[j]);
      if (k == 1) {
        cout << "pairwise coprime\n";
        return 0;
      }
    }
  }
  i = 2;
  k = gcd(a[0], a[1]);
  while (i < n) {
    k = gcd(k, a[i]);
    i++;
    if (k == 1) {
      cout << "setwise coprime\n";
      return 0;
    }
  }
  cout << "not coprime\n";
}
