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