#include <bits/stdc++.h>
using namespace std;
vector<int> sieve() {
  vector<bool> v((int)(1e6 + 10) + 1, true);
  v[1] = false;
  vector<int> primes;
  for (int i = 2; i * i <= (int)(1e6 + 10); i++) {
    if (v[i]) {
      for (int j = i * i; j <= (int)(1e6 + 10); j += i) {
        v[j] = false;
      }
    }
  }
  for (int p = 2; p < (int)(1e6 + 10); p++) {
    if (v[p]) {
      primes.push_back(p);
    }
  }
  return primes;
}
void solve() {
  vector<int> primes = sieve();
  map<int, int> m;
  long long int n;
  cin >> n;
  ;
  vector<int> A(n);
  for (long long int i = 0; i != n; i += 1) cin >> A[i];
  int flag = 0;
  for (int i = 0; i < n; i++) {
    int vlv = A[i];
    for (int i = 0; i < primes.size(); i++) {
      if (vlv % primes[i] == 0) {
        if (m.find(primes[i]) != m.end()) {
          flag = 1;
        }
        m[primes[i]]++;
      }
    }
  }
  if (flag == 0) {
    cout << "pairwise coprime";
    return;
  }
  for (auto x : m) {
    if (x.second == n) {
      cout << "not coprime";
      return;
    }
  }
  cout << "setwise coprime";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
