#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;
  vector<int> v(n);
  for (int i = 0; i < (int)(n); i++) cin >> v[i];
  vector<int> prime(3000001, 0);
  for (int i = 0; i < (int)(1000001); i++) {
    if (i == 0 || i == 1) continue;
    int x = i;
    if (prime[x] == 0) {
      while (x <= 1000000) {
        x += i;
        prime[x]--;
      }
    }
  }
  bool b = 1;
  ll cnt = 0;
  for (int i = 0; i < (int)(n); i++) {
    int x = v[i];
    for (int j = 2; j <= 1000; j++) {
      if (x % j != 0) continue;
      int y = x / j;
      if (j != 1 && prime[j] >= 1) b = 0;
      if (y != 1 && prime[y] >= 1) b = 0;
      if (prime[j] >= 0) {
        prime[j]++;
        cnt++;
        if (prime[y] >= 0) {
          prime[y]++;
          cnt++;
        }
      }
      if (cnt >= 80000) {
        b = 0;
        continue;
      }
    }
    if (b) {
      cout << "pairwise coprime" << endl;
      return 0;
    }
  }
  int 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;
}
