#include <bits/stdc++.h>
using namespace std;
int n, x, num[1000005], pp = 1;
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    scanf("%d", &x);
    for (int j = 2; j * j <= x; ++j)
      if (x % j == 0) {
        ++num[j];
        if (j * j != x) ++num[x / j];
        if (num[j] > 1 || num[x / j] > 1) pp = 0;
        if (num[j] == n || num[x / j] == n) {
          cout << "not coprime";
          return 0;
        }
      }
  }
  if (pp)
    cout << "pairwise coprime";
  else
    cout << "setwise coprime";
  return 0;
}
