#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void Eratos(vector<char>& p) {
  int i, j;
  p[0] = p[1] = 0;
  for (i = 2; i < p.size(); i++) {
    if (p[i]) {
      for (j = i << 1; j < p.size(); j += i) p[j] = 0;
    }
  }
  return;
}
int Existcp(vector<int>& d) {
  int i, j;
  vector<char> a(1000001, 0), p(1000001, 1);
  Eratos(p);
  for (i = 0; i < (d.size()); i++) {
    if (a[d[i]]) return true;
    a[d[i]] = 1;
  }
  for (i = 0; i < (p.size()); i++) {
    if (p[i]) {
      int s = 0;
      for (j = i; j < a.size(); j += i) {
        if (a[j]) s++;
      }
      if (s > 1) return true;
    }
  }
  return 0;
}
int main(void) {
  int num, i, g;
  cin >> num;
  vector<int> d(num);
  for (i = 0; i < (num); i++) cin >> d[i];
  g = d[num - 1];
  for (i = 0; i < (num - 1); i++) g = gcd(g, d[i]);
  if (g > 1)
    printf("not coprime\n");
  else if (Existcp(d))
    printf("setwise coprime");
  else
    printf("pairwise coprime");
  return 0;
}
