#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vector<int> >;
using pii = pair<int, int>;
using ppi = pair<pii, int>;
ll gcd(ll a, ll b) {
  if (b > a) {
    ll c = a;
    a = b;
    b = c;
  }
  while (b != 0) {
    ll c = b;
    b = a % b;
    a = c;
  }
  return a;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int ti = clock();
  ll n;
  cin >> n;
  vector<ll> a(n);
  vector<ll> divisor(1000000 + 1, 0);
  vector<ll> primes;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < 1000000; i++) {
    divisor[i] = i;
  }
  for (int i = 2; i <= 1000000; i++) {
    if (divisor[i] == i) {
      primes.push_back(i);
      int t = 2;
      while (i * t <= 1000000) {
        if (divisor[i * t] > i) divisor[i * t] = i;
        t++;
      }
    }
  }
  vector<int> used(1000000 + 1, 0);
  for (int i = 0; i < n; i++) used[a[i]]++;
  for (auto p : primes) {
    int cnt = 0;
    for (int i = p; i < 1000000; i += p) {
      cnt += used[i];
    }
    if (cnt > 1) {
      for (int i = 2; i < 1000000; i++) {
        ll t = a[0];
        for (int j = 1; j < n; j++) {
          t = gcd(t, a[j]);
        }
        if (t > 1) {
          cout << "not coprime" << endl;
          return 0;
        } else {
          cout << "setwise coprime" << endl;
          return 0;
        }
      }
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
