#include <bits/stdc++.h>
using namespace std;
int n;
int gcd(int a, int b) {
  if (a < b) swap(a, b);
  int r = 1;
  while (b != 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
int main() {
  bool pc = true, sc = false;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      if (gcd(a[i], a[j]) != 1) {
        pc = false;
        break;
      }
    }
    if (!pc) break;
  }
  if (!pc) {
    int tmp = gcd(a[0], a[1]);
    for (int i = 2; i < n; i++) {
      tmp = gcd(tmp, a[i]);
      if (tmp == 1) sc = true;
      if (sc) break;
    }
  }
  if (pc)
    cout << "pairwise coprime" << endl;
  else if (!pc && sc)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
