#include <bits/stdc++.h>
using namespace std;
const int r = 1e6 + 2;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (auto &i : a) cin >> i;
  string ans = "not coprime";
  vector<bitset<r>> factors;
  for (int i = 0; i < n; ++i) {
    bitset<r> num;
    for (int j = 1; j * j <= a[i]; ++j) {
      if (a[i] % j == 0) {
        num[j] = 1;
        num[a[i] / j] = 1;
      }
    }
    factors.push_back(num);
  }
  bool pairwise = true;
  for (int i = 0; i < n && pairwise; ++i) {
    for (int j = i + 1; j < n; ++j) {
      if ((factors[i] & factors[j]).count() != 1) {
        pairwise = false;
        break;
      }
    }
  }
  if (pairwise) {
    ans = "pairwise coprime";
    cout << ans << "\n";
    return 0;
  }
  bitset<r> b = factors[0];
  for (int i = 1; i < n; ++i) {
    b &= factors[i];
  }
  if (b.count() == 1) ans = "setwise coprime";
  cout << ans << "\n";
  return 0;
}
