#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<int> adj[1000005];
bool visit[1000005];
int GCD(int n, int m) {
  if (n % m == 0) return m;
  return GCD(m, n % m);
}
int main() {
  cin >> n;
  int arr[1000005];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  int ans = arr[0];
  bool chk = false;
  for (int i = 1; i < n; i++) {
    ans = GCD(ans, arr[i]);
    if (ans > 1) chk = true;
  }
  if (ans > 1)
    cout << "not coprime";
  else {
    if (chk == false)
      cout << "pairwise coprime";
    else
      cout << "setwise coprime";
  }
  return 0;
}
