#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 printVector(vector<type> vec) {
  stringstream ss;
  ll n = vec.size();
  for (ll i = 0; i < n; i++) {
    ss << vec[i] << " ";
    if (i != n - 1) ss << " ";
  }
  cout << ss.str() << endl;
}
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;
}
vector<pll> fastPrimeFactorize(ll num, vll D) {
  vector<pll> res;
  vector<ll> ex(num, 0);
  ll d = 0;
  while (num != 1) {
    ex[D[num - 1] - 1]++;
    num /= D[num - 1];
  }
  for (ll i = 1; i < ex.size(); i++) {
    if (ex[i] != 0) res.emplace_back(pll(i + 1, ex[i]));
  }
  return res;
}
bool preprocessFPF(vll A) {
  sort(A.rbegin(), A.rend());
  ll n = A[0];
  vll D(n);
  iota(D.begin(), D.end(), 1);
  for (ll i = 2; i * i <= n; i++) {
    if (D[i - 1] == i) {
      ll k = 1;
      while (i * k <= n) {
        D[i * k - 1] = i;
        k++;
      }
    }
  }
  vector<ll> bucket(n, 0);
  for (ll i = 0; i < A.size(); i++) {
    vector<pll> res = fastPrimeFactorize(A[i], D);
    for (ll j = 0; j < res.size(); j++) {
      ll g = res[j].first - 1;
      if (bucket[g] == 0)
        bucket[g]++;
      else
        return false;
    }
  }
  return true;
}
int main() {
  ll N;
  cin >> N;
  vll A(N);
  inputVector(A);
  if (preprocessFPF(A))
    cout << "pairwise coprime" << endl;
  else if (isSetwise(A))
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
