#include <bits/stdc++.h>
using namespace std;
const int M = 1000000;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A.at(i);
  vector<bool> prime(M + 1);
  for (int i = 0; i <= M; i++) prime.at(i) = true;
  vector<int> P;
  for (int i = 2; i <= M; i++) {
    if (prime.at(i)) {
      for (int j = i * 2; j <= N; j += i) prime.at(j) = false;
      P.push_back(i);
    }
  }
  int l = P.size();
  bool pair = true, set = true;
  for (int i = 0; i < l; i++) {
    vector<bool> R(N, false);
    int count = 0;
    int prim = P.at(i);
    if (pair) {
      for (int j = 0; j < N; j++) {
        if (A.at(j) % prim == 0) count++;
      }
      if (count >= 2) pair = false;
      if (count == N) set = false;
    } else if (set) {
      bool can = true;
      for (int j = 0; j < N; j++) {
        if (A.at(j) % prim != 0) {
          can = false;
          break;
        }
      }
      if (can) set = false;
    } else
      break;
  }
  if (!pair) {
    if (!set)
      cout << "not coprime" << endl;
    else
      cout << "setwise coprime" << endl;
  } else
    cout << "pairwise coprime" << endl;
}
