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