#include <bits/stdc++.h>
using namespace std;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
long long gcd(long long n, long long m) {
  if (n < m) swap(n, m);
  if (n % m == 0) return m;
  return gcd(m, n % m);
}
long long lcm(long long n, long long m) { return n * m / gcd(n, m); }
int main() {
  int N;
  cin >> N;
  vector<long long> A(N);
  long long G = 1, L = 1, mult = 1;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    if (i == 0) {
      G = A[0];
      L = A[0];
      mult = A[0];
      continue;
    }
    G = gcd(G, A[i]);
    L = lcm(L, A[i]);
    mult *= A[i];
  }
  if (mult == L)
    cout << "pairwise coprime" << endl;
  else if (G == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
