#include <bits/stdc++.h>
using namespace std;
constexpr int max(int a, int b) { return a > b ? a : b; }
const int max_size = 2 * (int)1e6 + 1;
int min_factor[max_size] = {
    0,
    1,
};
int n;
map<int, int> check;
void init() {
  for (int i = 2; i < max_size; ++i) min_factor[i] = i;
  for (int i = 2; i * i < max_size; ++i) {
    if (min_factor[i] != i) continue;
    for (long long j = i * i; j < max_size; j += i) {
      min_factor[j] = i;
    }
  }
}
int main() {
  init();
  scanf("%d", &n);
  for (int i = 0, a; i < n; ++i) {
    scanf("%d", &a);
    map<int, int> temp;
    while (a != 1) {
      if (a % min_factor[a] == 0 and temp[min_factor[a]] == 0) {
        check[min_factor[a]]++;
        temp[min_factor[a]]++;
      }
      a /= min_factor[a];
    }
  }
  int ans = 0;
  for (auto val : check) {
    ans = max(ans, val.second);
  }
  if (ans == n) {
    printf("%s", "not coprime");
  } else if (ans == 1) {
    printf("%s", "pairwise coprime");
  } else {
    printf("%s", "setwise coprime");
  }
  return 0;
}
