#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) { return (x % y) ? gcd(y, x % y) : y; }
bool gcdPc(int N, int A[]) {
  for (int i = 0; i < N - 1; i++) {
    for (int j = i + 1; j < N; j++) {
      if (gcd(A[i], A[j]) != 1) return false;
    }
  }
  return true;
}
bool gcdSc(int N, int A[]) {
  int count = 0;
  int gcdTmp = A[0];
  for (int i = 1; i < N; i++) {
    gcdTmp = gcd(gcdTmp, A[i]);
    if (gcdTmp == 1) return true;
  }
  return false;
}
int main() {
  int N;
  cin >> N;
  int A[N];
  for (int i = 0; i < N; i++) cin >> A[i];
  if (gcdPc(N, A)) {
    cout << "pairwise coprime" << endl;
  } else if (gcdSc(N, A)) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
