#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int setwise(int a[], int n) {
  int res = a[0];
  for (int i = 1; i < n; i++) {
    res = gcd(a[i], res);
    if (res == 1) return 1;
  }
  return res;
}
int main() {
  int n;
  cin >> n;
  int a[n], c = 0;
  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) c++;
    }
  }
  if (c == (n * (n - 1) / 2))
    cout << "pairwise coprime";
  else if (setwise(a, n) == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  return 0;
}
