#include <bits/stdc++.h>
using namespace std;
using Pair = pair<long long, pair<int, int>>;
const long long mod = 1000000007;
const long double pi = acos(-1.0);
const long long INF = 1LL << 61;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
long long lcm(long long x, long long y) { return x / gcd(x, y) * y; }
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<long long> p(n);
  for (int i = 0; i < (int)(n); i++) {
    cin >> p[i];
  }
  long long allgcd = p[0];
  for (int i = 1; i < (int)(n); i++) {
    allgcd = gcd(allgcd, p[i]);
  }
  if (allgcd != 1) {
    cout << "not coprime"
         << "\n";
    return 0;
  }
  vector<long long> q(1010101);
  for (int i = 0; i < (int)(n); i++) {
    for (int j = 1; j * j <= p[i]; j++) {
      if (p[i] % j != 0) continue;
      int a = j;
      int b = p[i] / j;
      bool asosu = true;
      if (a == 1) asosu = false;
      for (int k = 2; k * k <= a; k++) {
        if (a % k == 0) {
          asosu = false;
          break;
        }
      }
      if (asosu) q[a]++;
      if (b == a) continue;
      bool bsosu = true;
      for (int k = 2; k * k <= b; k++) {
        if (b % k == 0) {
          bsosu = false;
          break;
        }
      }
      if (bsosu) q[b]++;
    }
  }
  for (int i = 2; i <= 1000000; i++) {
    if (q[i] >= 2) {
      cout << "setwise coprime"
           << "\n";
      return 0;
    }
  }
  cout << "pairwise coprime"
       << "\n";
}
