#include <bits/stdc++.h>
using namespace std;
long long dx[4] = {1, 0, -1, 0};
long long dy[4] = {0, 1, 0, -1};
std::vector<int> Eratosthenes(const int N) {
  std::vector<bool> is_prime(N + 1);
  for (int i = 0; i <= N; i++) {
    is_prime[i] = true;
  }
  std::vector<int> P;
  for (int i = 2; i <= N; i++) {
    if (is_prime[i]) {
      for (int j = 2 * i; j <= N; j += i) {
        is_prime[j] = false;
      }
      P.emplace_back(i);
    }
  }
  return P;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a, b, c, d, m, n, maxi = 0, f = 0, mini = 1000, sum = 0;
  string str;
  cin >> n;
  vector<int> v(n);
  for (long long i = (long long)(0); i < (long long)(n); i++) cin >> v[i];
  map<int, int> mp;
  set<int> s;
  for (const auto &x : Eratosthenes(1000)) {
    sum++;
    s.insert(x);
  }
  maxi = 1;
  for (long long i = (long long)(0); i < (long long)(n); i++) {
    for (auto itr = s.begin(); itr != s.end(); ++itr) {
      if (v[i] % *itr == 0) {
        mp[*itr]++;
        if (*itr != (v[i] / *itr)) mp[v[i] / *itr]++;
      }
    }
  }
  for (auto itr = s.begin(); itr != s.end(); ++itr) {
    if (*itr == 1) continue;
    maxi = max(mp[*itr], maxi);
  }
  if (maxi == n)
    cout << "not coprime" << endl;
  else if (maxi == 1)
    cout << "pairwise coprime" << endl;
  else
    cout << "setwise coprime" << endl;
  return 0;
}
