#include <bits/stdc++.h>
using namespace std;
int a[1000005];
map<int, bool> mp;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  bool f;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    for (int j = 2; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        if (mp[j])
          f = 1;
        else
          mp[j] = 1;
      }
    }
  }
  int gc = a[0];
  for (int i = 1; i < n; i++) {
    gc = gcd(gc, a[i]);
  }
  if (!f && gc == 1)
    cout << "pairwise coprime" << endl;
  else if (gc == 1)
    cout << "setwise coprime" << endl;
  else if (gc != 1)
    cout << "not coprime" << endl;
  return 0;
}
