#include <bits/stdc++.h>
using namespace std;
bool p[1000010];
vector<int> prime;
void findp() {
  for (int i = 2; i < 1000005; i++) {
    if (p[i] == 1) continue;
    p[i] = 1;
    prime.push_back(i);
    for (int j = i + i; j < 1000005; j += i) {
      p[j] = 1;
    }
  }
}
int n;
int a[1000010];
int num[80000];
int main() {
  findp();
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    for (int j = 0; prime[j] * prime[j] < a[i]; j++) {
      if (a[i] % prime[j] == 0) {
        num[j]++;
        while (a[i] % prime[j] == 0) a[i] /= prime[j];
      }
    }
  }
  bool f1, f2;
  f1 = f2 = 0;
  for (int i = 0; i < prime.size(); i++) {
    if (num[i] > 1) f1 = 1;
    if (num[i] == n) f2 = 1;
  }
  if (f2) {
    cout << "not coprime" << endl;
  } else if (f1) {
    cout << "setwise coprime" << endl;
  } else
    cout << "pairwise coprime" << endl;
  return 0;
}
