#include <bits/stdc++.h>
using namespace std;
int gcm(int x, int y) {
  if (x % y == 0) return y;
  return gcm(y, x % y);
}
int main() {
  int n, x;
  string ans;
  cin >> n;
  vector<int> a(n);
  vector<int> d;
  for (int i = 0; i < n; i++) {
    cin >> a.at(i);
  }
  sort(a.begin(), a.end());
  x = a.at(0);
  for (int i = 2; i <= sqrt(x); i++) {
    if (x % i == 0) {
      d.push_back(i);
      while (x % i == 0) {
        x /= i;
      }
    }
  }
  if (x != 1) d.push_back(x);
  for (int i = 0; i < d.size(); i++) {
    int flag = 1;
    for (int j = 1; j < n; j++) {
      if (a.at(j) % d.at(i) != 0) {
        flag = 0;
        break;
      }
    }
    if (flag == 1) {
      ans = "not coprime";
      break;
    }
  }
  if (ans != "not coprime") {
    int h = 1;
    for (int i = 0; i < n - 1; i++) {
      for (int j = i + 1; j < n; j++) {
        if (gcm(a.at(i), a.at(j)) != 1) {
          h = 0;
          break;
        }
      }
      if (h == 0) {
        break;
      }
    }
    if (h == 1)
      ans = "pairwise coprime";
    else
      ans = "setwise coprime";
  }
  cout << ans << endl;
}
