#include <bits/stdc++.h>
using namespace std;
int GCD(int a, int b) {
  int s, l, x;
  if (a < b) {
    s = a;
    l = b;
  } else {
    s = b;
    l = a;
  }
  while (s != 0) {
    x = l % s;
    l = s;
    s = x;
  }
  return l;
}
int main(void) {
  int n, flag = 1;
  cin >> n;
  vector<int> a(n);
  for (size_t i = 0; i < n; i++) cin >> a[i];
  sort(a.begin(), a.end());
  int gcd = GCD(a[0], a[1]);
  for (size_t i = 2; i < n; i++) {
    gcd = GCD(gcd, a[i]);
  }
  if (gcd != 1) flag = 2;
  if (flag == 1) {
    flag = 0;
    for (size_t i = 0; i < n - 1; i++) {
      for (size_t j = n - 1; j > i; j--) {
        if (GCD(a[i], a[j]) != 1) {
          flag = 1;
          break;
        }
      }
      if (flag == 1) break;
    }
  }
  if (flag == 0)
    cout << "pairwise coprime" << endl;
  else if (flag == 1)
    cout << "setwise coprime" << endl;
  else if (flag == 2)
    cout << "not coprime" << endl;
  return 0;
}
