#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long m, n;
  long long i, j;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < (int)((a).size()); i++) {
    cin >> a[i];
  };
  vector<bool> primes(1001, true);
  for (i = 4; i <= 1000; i += 2) {
    primes[i] = false;
  }
  for (int i = 3; i <= 1000; i += 2) {
    if (primes[i])
      for (int j = i * 2; j <= 1000; j += i) {
        primes[j] = false;
      }
  }
  vector<long long> p;
  for (i = 2; i <= 1000; i++) {
    if (primes[i]) p.push_back(i);
  }
  unordered_map<long long, long long> count;
  for (auto prime : p) {
    for (long long x : a) {
      if (x % prime == 0) count[prime]++;
    }
  }
  long long maxi = 1;
  for (auto x : count) {
    maxi = max(maxi, x.second);
  }
  if (maxi == 1) {
    cout << "pairwise coprime" << '\n';
  } else if (maxi != n) {
    cout << "setwise coprime" << '\n';
  } else {
    cout << "not coprime" << '\n';
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  solve();
  return 0;
}
