#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Vi = vector<int>;
using VVi = vector<Vi>;
using Vl = vector<ll>;
using VVl = vector<Vl>;
using Vb = vector<bool>;
using VVb = vector<Vb>;
using P = pair<int, int>;
using Pll = pair<ll, ll>;
const ll mod = 1000000007;
const ll inf = 1000000000000;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
int main() {
  int n;
  cin >> n;
  Vi v(n);
  for (int i = 0; i < (int)(n); i++) cin >> v[i];
  Vi prime(2000001, 0);
  for (int i = 2; i < (int)(1000001); i++) {
    if (prime[i] != 0) continue;
    ll x = i;
    while (x <= 1000000) {
      x += i;
      prime[x] = 1;
    }
  }
  Vi cnt(2000001, 0);
  for (int i = 0; i < (int)(n); i++) {
    int x = v[i];
    for (int i = 2; i < (int)(sqrt(x) + 1); i++) {
      if (x % i != 0) continue;
      int y = x / i, z = i;
      cnt[y]++;
      if (y != z) cnt[z]++;
    }
  }
  bool b = 1;
  for (int i = 2; i < (int)(1000001); i++) {
    if ((!prime[i]) && cnt[i] >= 2) b = 0;
  }
  if (b) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  ll g = v[0];
  for (int i = 0; i < (int)(n); i++) g = gcd(g, v[i]);
  if (g == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
