#include <bits/stdc++.h>
using namespace std;
int A[1000100];
int main() {
  int n;
  cin >> n;
  int x;
  for (int j = 0; j < (int)(n); j++) {
    cin >> x;
    int a = x;
    set<int> s;
    for (int i = 2; i * i <= x; i++) {
      while (a % i == 0) {
        s.insert(i);
        a /= i;
      }
    }
    if (a != 1) s.insert(a);
    for (auto y : s) {
      A[y]++;
    }
  }
  int ma = 0;
  for (int i = 2; i <= n; i++) {
    ma = max(ma, A[i]);
  }
  if (ma == n)
    cout << "not coprime" << endl;
  else if (ma == 1)
    cout << "pairwise coprime" << endl;
  else
    cout << "setwise coprime" << endl;
  return 0;
}
