#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  vector<int> p(100000);
  for (int i = 0; i < 100000; i++) p[i] = i + 2;
  for (int i = 0;;) {
    for (int j = i + 1;;) {
      if (j >= p.size()) break;
      if (p.at(j) % p.at(i) == 0)
        p.erase(p.begin() + j);
      else
        j++;
    }
    i++;
    if (i >= p.size()) break;
  }
  int maxp = 1;
  for (int i = 0; i < p.size(); i++) {
    int cnt = 0;
    for (int j = 0; j < N; j++) {
      if (A.at(j) % p.at(i) == 0) cnt++;
    }
    maxp = max(maxp, cnt);
  }
  if (maxp == N) {
    cout << "not coprime" << endl;
    return 0;
  }
  if (maxp > 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  if (maxp == 1) cout << "pairwise coprime" << endl;
}
