#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;
}
vector<ll> divisor(1000000 + 1, 0);
void eratosthenes(ll a, vector<int>& used) {
  while (a > 1) {
    used[divisor[a]]++;
    a %= divisor[a];
  }
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int ti = clock();
  ll n;
  cin >> n;
  vector<ll> a(n);
  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) {
      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++) {
    eratosthenes(a[i], used);
  }
  for (int i = 2; i < 1000000; i++) {
    if (used[i] > 1) {
      ll t = a[0];
      for (int i = 1; i < n; i++) {
        t = gcd(t, a[i]);
      }
      if (t > 1) {
        cout << "not coprime" << endl;
        return 0;
      } else {
        cout << "setwise coprime" << endl;
        return 0;
      }
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
