#include <bits/stdc++.h>

#define rep(i, n) for (ll i = 0; i < (n); i++)
using namespace std;
typedef long long ll;

ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }

int main() {
  ll n, g = 0, cnt[1000005] = {};
  cin >> n;

  rep(i, n) {
    ll a;
    cin >> a;
    cnt[a]++;
    g = gcd(g, a);
  }
  bool ok = true;
  for (ll i = 2; i < 1000005; i++) {
    ll sum = 0;
    for (ll j = i; j < 1000005; j += i) sum += cnt[j];
    if (sum > 1) ok = false;
  }
  cout << (ok ? "pairwise coprime" : g == 1 ? "setwise coprime" : "not coprime")
       << endl;
  return 0;
}