#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 = 0;
  cin >> n;
  int a[n];
  for (size_t i = 0; i < n; i++) cin >> a[i];
  for (size_t i = 0; i < n - 1; i++) {
    for (size_t j = i + 1; j < n; j++) {
      if (GCD(a[i], a[j]) != 1) {
        flag = 1;
        break;
      }
    }
    if (flag == 1) break;
  }
  if (flag == 1) {
    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 == 0)
    cout << "pairwise coprime" << endl;
  else if (flag == 1)
    cout << "setwise coprime" << endl;
  else if (flag == 2)
    cout << "not coprime" << endl;
  return 0;
}
