#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
using vvll = vector<vector<ll>>;
using vll = vector<ll>;
const ll MOD = 9998903;
ll GCD(ll a, ll b) {
  if (b == 0)
    return a;
  else
    return GCD(b, a % b);
}
ll LCM(ll a, ll b) { return (a * b) / GCD(a, b); }
template <class type>
void inputVector(vector<type>& vec) {
  for (ll i = 0; i < vec.size(); i++) {
    cin >> vec[i];
  }
}
bool isSetwise(vll vec) {
  ll gcd = vec[0];
  for (ll i = 1; i < vec.size(); i++) {
    gcd = GCD(gcd, vec[i]);
    if (gcd == 1) return true;
  }
  return false;
}
int main() {
  ll N;
  cin >> N;
  vll A(N);
  inputVector(A);
  ll lcm = A[0];
  ll product = A[0];
  for (ll i = 1; i < N; i++) {
    ll cur = LCM(lcm, A[i]) % MOD;
    lcm = cur % MOD;
    product *= A[i] % MOD;
  }
  if (product == lcm)
    cout << "pairwise coprime" << endl;
  else if (isSetwise(A))
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
