#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) {
  while (1) {
    y %= x;
    if (y == 0) return x;
    x %= y;
    if (x == 0) return y;
  }
}
int main() {
  int n;
  cin >> n;
  int N = 1000001;
  vector<int> furui(N);
  for (int i = 0; i < N; i++) furui[i] = i;
  for (int i = 2; i <= N; i++) {
    if (furui[i] == i) {
      for (int j = i * 2; j <= N; j += i) furui[j] = i;
    }
  }
  int a[n];
  set<int> s;
  bool b = 1;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    int A = a[i];
    while (furui[A] != 1) {
      int f = furui[A];
      if (s.count(A)) b = 0;
      s.insert(f);
      while (A % f == 0) A /= f;
    }
  }
  if (b) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int g = a[0];
  for (int i = 1; i < n; i++) {
    g = gcd(g, a[i]);
    if (g == 1) {
      cout << "setwise coprime" << endl;
      return 0;
    }
  }
  cout << "not coprime" << endl;
  return 0;
}
