#include <bits/stdc++.h>
using namespace std;
string getString(char x) {
  string s(1, x);
  return s;
}
int highestPowerof2(long long int n) {
  if (n == 0) return 0;
  int p = (int)log2(n);
  return p;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int test = 1;
  vector<int> fact(1e6 + 1, 0);
  for (int i = 0; i <= 1e6; i++) fact[i] = i;
  for (int i = 2; i <= 1e6; i++) {
    if (fact[i] == i) {
      for (int j = 1; j * i <= 1e6; j++) fact[j * i] = i;
    }
  }
  while (test--) {
    int n;
    cin >> n;
    vector<int> vec(n);
    vector<int> f(1e6 + 1, 0);
    for (int i = 0; i < n; i++) {
      cin >> vec[i];
      int k = vec[i];
      vector<int> mark(1e6 + 1, 0);
      while (k > 1) {
        int p = fact[k];
        if (mark[p] == 0) {
          mark[p] = 1;
          f[p]++;
        }
        k /= p;
      }
    }
    int check = 1;
    for (int i = 0; i < f.size(); i++) {
      if (f[i] > 1) {
        check = 0;
      }
    }
    if (check) {
      cout << "pairwise coprime" << endl;
      continue;
    }
    check = 1;
    for (int i = 0; i < f.size(); i++) {
      if (f[i] >= n) {
        check = 0;
      }
    }
    if (check) {
      cout << "setwise coprime" << endl;
      continue;
    }
    cout << "not coprime" << endl;
  }
}
