#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; ++i) cin >> A[i];
  int i = 0, g = A[0];
  for (int i = 0; i < N; ++i) g = gcd(g, A[i]);
  if (g != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  for (int w = 1; w < N; ++w) {
    for (int i = 0; i + w < N; ++i) {
      if (gcd(A[i], A[i + w]) != 1) {
        cout << "setwise coprime" << endl;
        return 0;
      }
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
