#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  b %= a;
  if (b == 0)
    return a;
  else
    gcd(b, a);
}
bool analyze(vector<int>& v, int x) {
  if (x == 1) return true;
  for (int i = 2; i <= (int)sqrt(x); i++) {
    if (x % i == 0) {
      auto result = find((v).begin(), (v).end(), i);
      if (result != v.end())
        return false;
      else
        v.push_back(i);
    }
  }
  v.push_back(x);
  return true;
}
void solve() {
  int n, m;
  scanf("%d", &n);
  vector<int> A(n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &A[i]);
  }
  sort((A).begin(), (A).end());
  int tmp = A[0];
  for (int i = 1; i < n; i++) {
    tmp = gcd(tmp, A[i]);
  }
  if (tmp > 1) {
    printf("not coprime\n");
    return;
  }
  vector<int> X;
  for (int i = 0; i < n; i++) {
    if (analyze(X, A[i]))
      continue;
    else
      goto setwise;
  }
  printf("pairwise coprime\n");
  return;
setwise:
  printf("setwise coprime\n");
  return;
}
int main() {
  solve();
  return 0;
}
