#include <bits/stdc++.h>
using namespace std;
bool isPrime(int n) {
  int start = sqrt(n);
  for (int i = start; i > 1; i--)
    if (n % i == 0) return false;
  return true;
}
int gcd(int no1, int no2) {
  if (no2 == 0) return no1;
  return gcd(no2, no1 % no2);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  t = 1;
  while (t--) {
    int n;
    cin >> n;
    vector<int> data(n);
    for (int i = 0; i < n; i++) cin >> data[i];
    map<int, int> exist;
    bool firstSol = true;
    int primeCount = 0;
    vector<int> nonPrime;
    for (int i = 0; i < n; i++) {
      if (data[i] != 1) {
        auto it = exist.find(data[i]);
        if (it == exist.end())
          exist.insert(make_pair(data[i], 1));
        else
          firstSol = false;
        if (!isPrime(data[i]))
          nonPrime.push_back(data[i]);
        else
          primeCount += 1;
      } else
        primeCount += 1;
    }
    int finalAns = false;
    if (firstSol) {
      bool allOne = true;
      for (int i = 0; i < nonPrime.size(); i++) {
        for (int j = i + 1; j < nonPrime.size(); j++) {
          if (gcd(nonPrime[i], nonPrime[j]) != 1) {
            allOne = false;
            break;
          }
        }
        if (!allOne) break;
      }
      if (allOne) {
        finalAns = true;
        cout << "pairwise coprime" << endl;
      }
    }
    if (!finalAns) {
      int ans = data[0];
      for (int i = 1; i < n; i++) ans = gcd(ans, data[i]);
      if (ans == 1) {
        finalAns = true;
        cout << "setwise coprime" << endl;
      }
    }
    if (!finalAns) cout << "not coprime" << endl;
  }
  return 0;
}
