#include <bits/stdc++.h>
using namespace std;
int main() {
  long n;
  cin >> n;
  vector<long> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  string ans = "pairwise coprime";
  map<long, long> mp;
  for (int i = 0; i < n; i++) {
    long ai = a[i];
    for (int j = 2; j * j <= ai; j++)
      if (ai % j == 0) {
        if (mp.find(j) == mp.end())
          mp[j] = 1;
        else {
          ans = "setwise coprime";
          mp[j]++;
        }
        while (ai % j == 0) ai /= j;
      }
    if (ai != 1) {
      if (mp.find(ai) == mp.end())
        mp[ai] = 1;
      else {
        ans = "setwise coprime";
        mp[ai]++;
      }
    }
  }
  if (ans == "pairwise coprime") {
    cout << ans << endl;
    return 0;
  }
  for (auto itr = mp.begin(); itr != mp.end(); itr++) {
    auto v = itr->second;
    if (v == n) ans = "not coprime";
  }
  cout << ans << endl;
  return 0;
}
