#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a < b) swap(a, b);
  return (b == 0 ? a : gcd(b, a % b));
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<int> p = {2};
  vector<bool> z(1e6, 1);
  for (int i = 3; i < 1e6; i += 2) {
    if (z[i]) {
      p.push_back(i);
      if (i <= 1e3)
        for (int j = i * i; j < 1e6; j += i) z[j] = 0;
    }
  }
  map<int, bool> m;
  bool b{1};
  for (int i = 0; i < n; i++) {
    for (int k : p) {
      if (k > a[i]) break;
      if (a[i] % k == 0) {
        while (a[i] % k == 0) a[i] /= k;
        if (m[k]) {
          b = 0;
          break;
        } else
          m[k] = 1;
      }
    }
    if (!b) break;
  }
  if (b) {
    cout << "pairwise coprime";
    return 0;
  }
  int k = a[0];
  for (int i = 1; i < n; i++) {
    k = gcd(k, a[i]);
  }
  cout << (k == 1 ? "setwise coprime" : "not coprime");
}
