#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pull = pair<ull, ll>;
using pis = pair<int, string>;
#define all(x) (x).begin(), (x).end()
#define INF 1000000000
#define LLINF 10000000000000000ll
#define MOD1 1000000007LL
#define MOD2 999999937LL

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  //cout << fixed << setprecision(15)

  ll n;
  cin >> n;
  vector<ll> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];

  /*ll issetwisecoprime = a[0];
  for (int i = 0; i < n; i++) issetwisecoprime = __gcd(issetwisecoprime, a[i]);
  if (issetwisecoprime == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }*/

  ll lcmall1 = 1, lcmall2 = 1, lcmcheck1 = 1, lcmcheck2 = 1, gcdall = a[0];
  for (int i = 0; i < n; i++) {
    lcmall1 *= a[i], lcmall2 *= a[i];
    lcmall1 %= MOD1, lcmall2 %= MOD2;
    gcdall = __gcd(gcdall, a[i]);
    lcmcheck1 = (lcmcheck1 * a[i]) / __gcd(lcmcheck1, a[i]), lcmcheck2 = (lcmcheck2 * a[i]) / __gcd(lcmcheck2, a[i]);
    lcmcheck1 %= MOD1, lcmcheck2 %= MOD2;
  }

  if ((lcmall1 == lcmcheck1) && (lcmall2 == lcmcheck2)) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  if (gcdall == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
