#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void output(T a, int p = 0) {
  if (p)
    cout << fixed << setprecision(p) << a << "\n";
  else
    cout << a << "\n";
}
template <typename T>
inline void voutput(T &v) {
  for (int i = (int)(0); i < (int)(v.size()); ++i) {
    if (i)
      cout << " " << v[i];
    else
      cout << v[i];
  }
  cout << endl;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  int N;
  cin >> N;
  vector<long long> A(N);
  for (int i = (int)(0); i < (int)(N); ++i) cin >> A[i];
  long long g = A[0];
  for (int i = (int)(0); i < (int)(N); ++i) g = gcd(g, A[i]);
  vector<int> count(100010, 0);
  for (int i = (int)(0); i < (int)(N); ++i) {
    for (int j = 2; j * j <= A[i]; j++) {
      if (A[i] % j == 0) {
        count[j]++;
      }
      while (A[i] % j == 0) {
        A[i] /= j;
      }
    }
    if (A[i] > 1) count[A[i]]++;
  }
  bool all_one = true;
  for (int i = (int)(0); i < (int)(100010); ++i) {
    if (count[i] > 1) {
      all_one = false;
      break;
    }
  }
  if (all_one) {
    output("pairwise coprime");
    return 0;
  }
  if (g == 1) {
    output("setwise coprime");
    return 0;
  }
  output("not coprime");
  return 0;
}
