#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fll;
int main() {
  int n;
  cin >> n;
  multiset<int> s;
  bool multi = 0;
  int mcount = 0;
  for (int i = 0; i < (n); ++i) {
    int t;
    cin >> t;
    if (s.count(t) && t != 1) multi = 1;
    s.insert(t);
  }
  vector<bool> checked(1000005, 0);
  int count = 0;
  for (int i = 2; i * i <= 1000000; i++) {
    if (checked[i]) continue;
    count = 0;
    if (mcount == n) break;
    for (int j = 1; i * j <= 1000000; j++) {
      checked[i * j] = 1;
      if (s.count(i * j)) count++;
    }
    if (count >= 2) multi = 1;
    mcount = max(mcount, count);
  }
  if (!multi)
    cout << "pairwise coprime" << endl;
  else if (mcount == n)
    cout << "not coprime" << endl;
  else
    cout << "setwise coprime" << endl;
}
