#include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y) {
  if (x % y == 0) return y;
  return gcd(y, x % y);
}
long long ans(long long a[], long long t) {
  long long an = 0;
  long long ann = 0;
  long long r = 1e12;
  for (long long i = 0; i < t - 1; i++) {
    for (long long j = i + 1; j < t; j++) {
      if (gcd(a[i], a[j]) != 1) {
        ann++;
      } else
        an++;
      if (an != 0 && ann != 0) {
        return r;
        break;
      }
    }
  }
  long long rr = a[0];
  if (an == 0) {
    for (long long i = 0; i < t; i++) {
      rr = gcd(rr, a[i]);
    }
  }
  if (rr == 1) {
    return r;
  }
  return an;
}
int main() {
  ios::sync_with_stdio(0);
  long long x;
  cin >> x;
  long long oz = 0;
  long long a[x];
  for (long long i = 0; i < x; i++) {
    cin >> a[i];
  }
  long long aa = ans(a, x);
  if (aa == 1e12) {
    cout << "setwise coprime";
  } else if (aa == x * (x - 1) / 2) {
    cout << "pairwise coprime";
  } else
    cout << "not coprime";
}
