#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  int n;
  cin >> n;
  vector<int> vc(n + 1);
  for (int i = 1; i <= n; i++) cin >> vc[i];
  int f = -1;
  int result = vc[1];
  for (int i = 2; i <= n; i++) {
    result = gcd(result, vc[i]);
    if (result == 1) {
      f = 0;
      break;
    }
  }
  if (f == 0) {
    for (int i = 1; i < n; i++) {
      for (int j = i + 1; j <= n; j++) {
        if (gcd(vc[i], vc[j]) != 1) {
          f = 1;
          break;
        }
      }
      if (f == 1) break;
    }
  }
  if (f == -1)
    cout << "not coprime";
  else if (f == 0)
    cout << "pairwise coprime";
  else
    cout << "setwise coprime";
}
