#include <bits/stdc++.h>
using namespace std;
int fact[1000001];
bool ok = false;
int gcd(int a, int b) {
  if (b != 0) return gcd(b, a % b);
  return a;
}
void f(int x) {
  if (ok) return;
  for (int i = 1; i * i <= x; i++) {
    if (x % i == 0) {
      int a = i;
      int b = x / i;
      if (a == b) {
        a = i;
        b = i;
      }
      if (a != 1) {
        if (fact[a]) {
          ok = true;
          return;
        }
        fact[a]++;
      }
      if (b != 1) {
        if (fact[b]) {
          ok = true;
          return;
        }
        fact[b]++;
      }
    }
  }
}
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int gc = a[0];
  f(a[0]);
  for (int i = 1; i < n; i++) {
    f(a[i]);
    gc = gcd(gc, a[i]);
  }
  if (!ok)
    cout << "pairwise coprime"
         << "\n";
  else if (gc == 1)
    cout << "setwise coprime"
         << "\n";
  else
    cout << "not coprime"
         << "\n";
  return 0;
}
