#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = 1000000007;
ll N, M;
vector<ll> A;
long long GCD(long long a, long long b) {
  if (a < b) {
    ll tmp = a;
    a = b;
    b = tmp;
  }
  ll r = a % b;
  while (r != 0) {
    a = b;
    b = r;
    r = a % b;
  }
  return b;
}
bool pc() {
  {
    ll zz = false;
    for (int j = 0; j < N; j++) {
      if (A[j] % 2 == 0) {
        if (!zz)
          zz = true;
        else if (zz)
          return false;
      }
    }
  }
  for (ll i = 3; i <= 1000; i += 2) {
    ll zz = false;
    for (int j = 0; j < N; j++) {
      if (A[j] % i == 0) {
        if (!zz)
          zz = true;
        else if (zz)
          return false;
      }
    }
  }
  return true;
}
bool sc() {
  ll g = A[0];
  for (int i = 1; i < N; i++) {
    g = GCD(g, A[i]);
    if (g == 1) return true;
  }
  return false;
}
int main() {
  cin >> N;
  cin.ignore();
  ll sum = 0;
  for (int i = 0; i < N; i++) {
    ll a;
    cin >> a;
    A.push_back(a);
  }
  cin.ignore();
  if (pc())
    cout << "pairwise coprime" << endl;
  else if (sc())
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
