#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, val;
  scanf("%d", &n);
  m = n;
  map<int, int> p;
  for (int i = 0; i < n; i++) {
    scanf("%d", &val);
    if (val == 1) m--;
    if (val % 2 == 0) {
      p[2]++;
      while (val % 2 == 0) val /= 2;
    }
    for (int j = 3; j < sqrt(val) + 1; j += 2) {
      if (val % j == 0) {
        p[j]++;
        while (val % j == 0) val /= j;
      }
    }
    if (val > 1) p[val]++;
  }
  int count = 0;
  int no = 0;
  map<int, int>::iterator it;
  for (it = p.begin(); it != p.end(); it++) {
    if (it->second == 1) count++;
    if (it->second == m) no = 1;
  }
  if (count == m)
    printf("pairwise coprime");
  else if (!no)
    printf("setwise coprime");
  else
    printf("not coprime");
  return 0;
}
