#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int g = a[0];
  for (int i = 1; i < n; i++) g = gcd(g, a[i]);
  bool pair = true;
  sort(a.begin(), a.end());
  int p = a[n - 1];
  vector<bool> prime(p, false);
  for (int i = 0; i < n; i++) {
    int q = a[i];
    int j = 2;
    while (j * j <= q) {
      if (a[i] % j == 0 && prime[j] == true)
        pair = false;
      else if (a[i] % j == 0)
        prime[j] = true;
      j++;
    }
  }
  if (pair)
    cout << "pairwise comprime" << endl;
  else if (g == 1)
    cout << "setwise comprime" << endl;
  else
    cout << "not comprime" << endl;
  return 0;
}
