#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a;
  int tmp;
  for (int i = 0; i < n; i++) {
    cin >> tmp;
    a.push_back(tmp);
  }
  int flg = 0;
  int m[1000001] = {};
  sort(a.begin(), a.end());
  vector<int> b;
  for (int i = 1; i <= sqrt(a[n - 1]); i++) {
    b.push_back(i);
  }
  for (int j = 0; j < n; j++) {
    if (a[j] > sqrt(a[n - 1])) {
      if (j > 1) {
        if (a[j] != a[j - 1]) {
          b.push_back(a[j]);
        }
      } else {
        b.push_back(a[j]);
      }
    }
  }
  for (int i = 0; i < b.size(); i++) {
    for (int j = 0; j < n; j++) {
      if (a[j] % b[i] == 0) {
        m[b[i]]++;
      }
    }
  }
  int mx = 0;
  for (int i = 2; i <= a[n - 1]; i++) {
    mx = max(mx, m[i]);
  }
  string res;
  if (mx == 1) {
    res = "pairwise coprime";
  } else if (mx < n) {
    res = "setwise coprime";
  } else {
    res = "not coprime";
  }
  cout << res;
}
