#include <bits/stdc++.h>
using namespace std;
using ll = long long;
long long gcd(long long a, long long b) {
  if (b == 0) {
    return a;
  } else {
    return gcd(b, a % b);
  }
}
ll MOD = 1e9 + 7;
int main() {
  int n, m;
  cin >> n;
  vector<ll> a(n);
  for (ll i = 0; i < ll(n); i++) cin >> a[i];
  ll s, p;
  s = gcd(a[0], a[1]);
  p = (a[0] * a[1]) % MOD;
  bool isS, isP;
  isS = false;
  isP = true;
  for (int i = 2; i < n; i++) {
    s = gcd(s, a[i]);
    if (gcd(p, a[i]) != 1) {
      isP = false;
    }
    p *= a[i];
  }
  if (s == 1) {
    if (isP) {
      cout << "pairwise coprime" << endl;
    } else {
      cout << "setwise coprime" << endl;
    }
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
