#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; ++i) cin >> A[i];
  bool ok = true;
  for (int i = 0; i < N - 1; ++i) {
    if (gcd(A[i], A[i + 1]) != 1) {
      ok = false;
      break;
    }
  }
  if (ok) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int g = A[0];
  for (int i = 0; i < N; ++i) {
    g = gcd(g, A[i]);
  }
  if (g == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
