#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;
  }
  if (N == 1) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  g = gcd(A[0], A[1]);
  i = 1;
  while (i < N) {
    if (g == 1) {
      if (i - 1 >= 0 && i + 1 < N) g = gcd(A[i - 1], A[i + 1]);
    } else {
      cout << "setwise coprime" << endl;
      return 0;
    }
    ++i;
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
