#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];
  }
  sort(a.begin(), a.end());
  int sp = a[0];
  for (int i = 0; i < n; ++i) {
    sp = gcd(sp, a[i]);
  }
  bool setwise = (sp == 1ll);
  vector<int> map(1000001);
  bool pairwise = true;
  for (int i = 0; i < n; ++i) {
    int val = a[i];
    if (map[val]) {
      pairwise = false;
      break;
    }
    for (int j = 2; j <= val; ++j) {
      if (val % j == 0) {
        for (int k = j; k <= 1000000; k += j) {
          map[k]++;
        }
      }
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << '\n';
  } else if (setwise) {
    cout << "setwise coprime" << '\n';
  } else {
    cout << "not coprime" << '\n';
  }
  return 0;
}
