#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
vector<long long> enum_divisors(long long N) {
  vector<long long> res;
  for (long long i = 2; i * i <= N; ++i) {
    if (N % i != 0) continue;
    while (N % i == 0) {
      N /= i;
    }
    res.push_back(i);
  }
  if (N != 1) res.push_back(N);
  return res;
}
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<vector<long long>> num(n);
  map<long long, long long> mp;
  for (long long i = 0; i < n; i++) {
    num[i] = enum_divisors(a[i]);
    for (long long x : num[i]) {
      mp[x]++;
    }
  }
  bool ok1 = true, ok2 = true;
  for (auto x : mp) {
    long long judge = x.second;
    if (judge > 1) ok1 = false;
    if (judge >= n) ok2 = false;
  }
  if (ok1)
    cout << "pairwise coprime" << endl;
  else if (ok2)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
