#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
using pint = pair<long long, long long>;
long long dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
signed main() {
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  bool p = 1, s = 1;
  map<long long, long long> mp;
  for (long long i = 0; i < n; i++) {
    long long q = a[i];
    for (long long j = 2; j * j <= q; j++) {
      if (q % j == 0) {
        mp[j]++;
        while (q % j == 0) {
          q /= j;
        }
      }
    }
    mp[q]++;
  }
  for (auto m : mp) {
    if (m.first != 1 && m.second != 1) p = 0;
  }
  long long now = a[0];
  for (long long i = 0; i < n; i++) {
    now = gcd(now, a[i]);
  }
  if (now != 1) s = 0;
  if (p) {
    cout << "pairwise coprime\n";
  } else if (s) {
    cout << "setwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
}
