#include <bits/stdc++.h>
using namespace std;

int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);

  int N, A, G;
  vector<int> V(1e6+1);
  cin >> N;
  while (cin >> A) {
    V.at(A)++;
    G = gcd(G, A);
  }
  if (G > 1) return cout << "not coprime" << "\n", 0;

  for (int i = 2; i <= 1e6; i++) {
    int cnt = 0;
    for (int j = i; j <= 1e6; j += i) {
      if (V.at(j)) cnt++;
    }
    if (cnt > 1) return cout << "setwise coprime" << "\n", 0;
  }
  cout << "pairwise coprime" << "\n";
}