#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<long long> a(n);
  vector<long long> sosuu(0);
  for (long long i = 2; i < 1001; i++) {
    bool tmp = true;
    for (long long j = 2; j * j <= i; ++j) {
      if (i % j == 0) tmp = false;
    }
    if (tmp) sosuu.push_back(i);
  }
  vector<bool> ans(1000000, false);
  vector<bool> ans2(1000000, false);
  for (long long s : sosuu) {
    ans[s] = true;
    ans2[s] = true;
  }
  bool pairwise = true;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    long long A = a[i];
    for (long long s : sosuu) {
      bool tmp = false;
      while (A % s == 0) {
        if (!ans[s]) pairwise = false;
        A = A / s;
        tmp = true;
      }
      if (tmp) ans[s] = false;
      if (!tmp) {
        ans2[s] = false;
      }
    }
    if (A != 1) {
      sosuu.push_back(A);
      ans[A] = true;
      if (i == 0) {
        ans2[A] = true;
      }
    }
  }
  bool setwise = false;
  for (long long s : sosuu) {
    if (ans2[s]) {
      setwise = true;
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
  } else if (setwise) {
    cout << "not coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
}
