#include <bits/stdc++.h>
using namespace std;
int main() {
  long n;
  cin >> n;
  vector<long> a(n), eras(1e6 + 1, 0);
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 2; i <= 1e6; i++)
    if (eras[i] == 0) {
      eras[i] = i;
      for (int j = 2; i * j <= 1e6; j++)
        if (eras[i * j] == 0) eras[i * j] = i;
    }
  vector<long> alle(1e6 + 1, 0);
  for (int i = 0; i < n; i++) {
    long ai = a[i];
    do {
      alle[eras[ai]]++;
      for (long d = eras[ai]; ai % d == 0;) ai /= d;
    } while (ai != 1);
  }
  string ans = "pairwise coprime";
  for (int i = 1; i <= 1e6; i++) {
    if (alle[i] == n)
      ans = "not coprime";
    else if (alle[i] > 1 && ans == "pairwise coprime")
      ans = "setwise coprime";
  }
  cout << ans << endl;
  return 0;
}
